SPOILER ALERT: This interview contains spoilers from “Dead to Me” Season 3, now streaming on Netflix.

Writer and executive producer Liz Feldman decided how to end “Dead to Me” while filming Season 2 in 2020 — but she still felt a bit of pressure when it actually came time to wrap up such a personal show.

“I felt a little bit nervous about the idea of the story I’ve chosen to tell, even though it’s based in deep reality and Judy is a character who is inspired by multiple people, but mostly a friend of mine who passed away of cancer at 38,” Feldman tells Variety. “I wanted it to be satisfying, but I also wanted it to be a real expression of what it means to go through grief and loss.”

In the final season, Judy (Linda Cardellini) learns that she has cancer. While undergoing chemotherapy, she admits that she wasn’t able to have children. Meanwhile, Jen (Christina Applegate), who stays by her side her throughout her treatment, gets pregnant with Ben’s (James Marsden) baby. After Judy selflessly confesses to Steve’s murder — which Jen committed at the end of Season 1 — the best friends head to Steve’s beachfront property in Mexico.

Ultimately, Judy convinces Jen to be honest to Ben about the baby and everything that happens; she dies with the positivity and optimism she’s always had. The series ends with Jen, Ben and her kids in the backyard and her telling him she needs to tell him something. Then, the screen goes black.

Courtesy of NETFLIX

“I wanted the end to still feel very much like the show. I didn’t want to put too fine a period on anything. This show always ends with an ellipsis. I didn’t want to stray from that,” Feldman says. “My experience with grief is, you don’t know what happens. That’s why it’s so long lasting, why grief is so hard to work through. Because you don’t know, you don’t have the answers. You don’t know where to put your feelings, you just have to feel them. I wanted people to feel their feelings, but also give a little sense of delight.”

So did Jen tell Ben about Steve — and did he forgive her? “I think that’s for you and for the audience to explore for himself. If I had wanted to explore that, I would have,” she says. “These women were imperfect and wonderful, they were flawed and they made mistakes and they did some things. I didn’t want to gloss over that.”

With the series wrapping up, the actors struggled to not only say goodbye to each other (we’ll get to that later) but also to the characters.

“I think there’s this thing about grief that whenever anybody close to me has gone and that person is a larger than life, sort of an indelible mark on your life that you can’t quite explain to somebody… I feel like Judy’s essence is like that,” Cardellini says. “Her being gone at the end is like, how will Jen ever explain who that person was? How will she ever try to tell somebody what it was like to have that person in her life? She’s such a strange, pixie person that she’s gone through these crazy events with. I feel like that’s what loss is. Anytime that I’ve lost somebody, it’s been that thing of like, how do I explain who this person is to my child, who never got a chance to meet that person? How will they understand what this person means to me? By Judy being gone, I think it leaves that feeling of grief, like you won’t get that back again, and you will never be able to explain that again, but life still grows and moves forward from that point.”

Courtesy of NETFLIX

Having Judy die in the end was an important part of the story for Feldman, and her “goal” for the season was to give everyone closure and in a way, connect everything. “Given what Judy went through, especially in the beginning of the show, and even prior to Season 1 — her whole history with fertility and infertility, which very much mirrors my own — it just felt like, wow, what a way to bring everything kind of full circle. The same is true with Judy’s storyline and what that was able to do for Jen in terms of healing from the loss of her mother.”

At first, the idea of making Jen pregnant sounded “crazy” to Feldman. But the more she thought about it and the other writers talked about it, it all came together.

“Being the method actor that I am when I found out about the pregnancy, I made sure immediately I gained 40 pounds. Think of that is pretty committed,” jokes Applegate. “No, it wasn’t hard. I mean, I’ve been pregnant. My body was not feeling amazing during our shooting, so it all kind of worked.”

Applegate was also diagnosed with multiple sclerosis during filming and many days on set were emotional. Feldman intentionally waited until the very end of the shoot to film Jen and Judy’s last scene together — their goodbye scene in bed.

“I almost couldn’t do it. I was going to throw up. I couldn’t even tone it down,” says Applegate. “If I had really shown what I was actually feeling on the inside, we wouldn’t have gotten any dialogue in.”

In fact, there were some takes where they “couldn’t get the dialogue out,” Cardellini says. While crying was written into the script, they had to do the scene a few different takes.

“I knew it was going to be really hard to get through, but I also wanted it to feel as weighted and authentic as possible — beyond just Jen and Judy saying goodbye, it was Christina and Linda saying goodbye, it was me saying goodbye and it was the entire crew,” Feldman recalls. “When we shot that scene, I stood there with Kelly Hutchinson, who’s my best friend, a writer on the show and very much one of the inspirations for this relationship, and we just stood arm in arm bawling. Then I realized everyone was crying — the crew, our producers. I think we actually did have to sound edit some sniffles because it was not just coming from the two women on camera. It was really beautiful.”