MORE ON:

Saying goodbye to a TV character is always hard — especially when the actor playing that character dies unexpectedly.

Fox’s “Glee” will deal with that scenario in Thursday’s episode, writing out the character of Finn Hudson following star Cory Monteith’s death in July at the age of 31 from an accidental drug overdose.

Cory Monteith as Finn in “Glee.”Photo: FOX

The episode, titled “The Quarterback,” won’t reference how Finn dies, but will instead show the New Directions glee club members learning of his death and planning a tribute to his life.

In a trailer for the episode released by Fox, the group can be seen setting up a memorial at Finn’s old locker, with Rachel — Lea Michele, Monteith’s on-again/off-again girlfriend in both the show and real life — crying.

Monteith struggled with addiction for years. Series creator Ryan Murphy told deadline.com in August that the show’s writers were initially going to have Finn die of an accidental drug overdose — but instead decided not to address it. Murphy said that to make Thursday’s episode anything other than a celebration of life felt “exploitative,” an emotion echoed by “Glee” fans.

“That’s not Finn, that’s not the character. That would be really unfair to the fans to see that and also the cast to have them have to go through that,” says Suzanne Gardner, co-author of “Don’t Stop Believin’: The Unofficial Guide to ‘Glee.’ ” “I care more about them treating the tribute respectfully.”

SAY YES?: Finn proposes toRachel in Season 3.Photo: FOX

Fox has dedicated a section of its Web site to remembering Monteith, where fans can post messages, donate to his favorite charities and find resources for dealing with substance abuse. At the Television Critics Association press tour in July, Fox entertainment chairman Kevin Reilly said that a portion of the proceeds from music sales for Thursday’s episode would be donated to one of Monteith’s favorite charities, Project Limelight, a Vancouver-based arts charity.

Though Fox declined to make any producers or executives available to talk about the tribute episode, Murphy said last week that it was incredibly difficult to shoot. “Almost everything in that episode is from the first take of every performance, because the actors and the crew had a really hard time shooting it. I’ve never seen a crew where you can’t continue shooting because they left the room sobbing,” Murphy said after the season premiere screening of his FX series “American Horror Story: Coven,” according to thewrap.com. “I think it’s amazing performances across the board, and everybody went into it with a lot of love.”

The “Glee” cast and crew aren’t the only ones missing Monteith and Finn, as many fans have posted on Glee’s Facebook page that they aren’t ready to say good-bye to the character.

“He and Rachel are sort of the end game of the show, they’ve made that very clear that they were supposed to be the couple and the two characters you’re supposed to care most about,” Gardner says. “To have him suddenly not there, I don’t think there’s any way that you’re not going to feel that absence.”