After 12 seasons and 279 episodes, “The Big Bang Theory” will sign off on Thursday, May 16. But the decision to end the comedy came in August of 2018, which has allowed the cast and creative team to have a long goodbye to the series — for better or worse.

“It’s like a long, drawn-out death,” says Mayim Bialik, who has played Amy Farrah Fowler since the third season finale. “It’s one thing to have a personal experience where a job of nine years — or 12, for some of the cast — ends, but we’ve done it very publicly.”

Additionally, the fact that the “Big Bang” writers famously approached the show on an episode-by-episode basis throughout the years was “nerve-wracking” for the cast, adds Bialik, because although there was an awareness that they would be saying goodbye on-screen, they didn’t know how they would be signing off until the last minute.

To properly service the entire ensemble — Johnny Galecki, Jim Parsons, Kaley Cuoco, Simon Helberg, Kunal Nayyar, Melissa Rauch, and Bialik — executive producer Steve Holland says the writers crafted the final three episodes as a “road to the end.”

“When we found out this was going to be the last season, we sat together and started talking about the landing place. We knew what was going to be the last piece of the finale for a long time,” he says. “One of the things that was important to us, and also the most challenging, was to make sure everyone got to shine in these last episodes.”

Kicking that off is the return of Christine Baranski as Leonard’s (Galecki) mother, Beverly, on the Thursday, May 9th episode. Although Baranski has been a frequent presence on the series, it has often been via Skype as the actress filmed “The Good Fight” (and “The Good Wife” before that) in New York. This time, they were able to make things work in-person: “The Good Fight” wrapped its season a week before she was needed in Los Angeles for “Big Bang,” so Baranski was able to film her scenes on the Warner Bros. soundstage alongside the rest of the cast.

“It was an absolutely beautiful episode,” Galecki says of the episode entitled “The Maternal Connection.” “I felt so dear about it, at the last minute I flew my [real] mother in from Chicago for the live audience taping, so she could be a part of it.”

Galecki says the episode is “outside of any sitcom pattern” but also one that he thinks ” will be my favorite Leonard episode.”

For Sheldon (Parsons) and Amy, much of the final season has seen the duo campaigning for a Nobel Prize. And while the audience may be rooting for the duo to be successful, “I would find it really delightful if they didn’t win,” Bialik says. “There’s something very sweet to the imperfection of these characters. I would welcome that kind of up in the air resolution. As a scientist who plays a scientist, I think [the attempt is] really significant. Some of the dynamics have highlighted what it’s like to be a female in this field, and I think that’s pretty special. It’s a lovely compliment to all of the fun and silliness we’ve also had.”

After spending much of the early half of the series too frightened to talk to girls while he was sober, one of the big mysteries about Raj’s (Nayyar) final few episodes is whether he will make it work with his off-on love Anu (played by Rati Gupta). Prior to reading the finale, Nayyar speculated his character’s true happy ending might be more of a twist.

“A very fitting ending would be if he realized the one thing he was always searching for was himself,” he says. “It would be very fitting for him to realize he is enough. So much of his evolution has been him trying to search for things on the outside. It would be very fitting if he were to come home to himself.”

No matter how the show ends, the team behind the show says the episode will be emotional but not necessarily wrap everything up with a bow.

“We have earned it,” Cuoco, who has played Penny since the pilot, says. “Even over the years, there have been emotional moments and there have been hilarious moments. The bottom line is people just love the characters. They love when they laugh and they’re OK when they cry and get sad. At the same time, I know the writers want these characters to live on in our lives; they don’t want some dramatic ending.”

Off-screen, parting after a life-changing experience has been a slow process for the team.

“It’s such a luxury as an actor to stay within one character and, in this case, tell 270-something stories. Though it’s been the same character, it’s broadened me over the years. Personally, it’s changed my family’s lives; it’s changed everything,” says Galecki.

“Someone likened it to the amount of time you spend with people you go to kindergarten to high school with. It’s an interesting point to make — but that’s time spent when you’re with a kid. You spend that time in adult years [and] you’ve been together for deaths, weddings, divorces, for the nitty gritty of life. And on top of it, a show that is world-widely received. Both the gifts and the complications that come with that. That’s a bond that no one else outside of [the show] could really understand.”

The group has gone through things like award shows, conventions, studio dedications, getting their hands and feet imprinted at the Chinese Theater, and other glamorous events over the show’s dozen-year run, but the actors all single out the charity work they were able to do because of “Big Bang” as one of its biggest perks.

“Getting to meet and work alongside the Make-a-Wish Foundation, and the people we get to meet every month who come to tapings, the bond we’ve made with young kids whose lives are going to be cut short, was one of the most memorable things,” Nayyar says. “That [experience] was always something I looked forward to. Yes, the other things are nice, but it was a really beautiful system we had in place where we got to do this. I’m going to miss that.”

Although it’s bittersweet, the team also realizes bidding farewell to a show that impacted them so much was always going to hurt.

“As Kaley [has] said, we could do this 25 seasons, and it would still be difficult saying goodbye,” Galecki says. “There’s not going to be a time that comes when any of us are sick of it. This feels as right as it’s ever going to feel.”

Danielle Turchiano contributed to this report.