The CW show has been building up to this moment since the pilot.

[Editor’s Note: The following contains spoilers from the “Crazy Ex-Girlfriend” episode, “I Never Want to See Josh Again.”]

“Crazy Ex-Girlfriend” has never shied away from its title as a way to examine what issues that a person might have that other people might label as “crazy.” Even before the series aired, co-creator, executive producer, and star Rachel Bloom was clear that — despite the rom-com trope of a woman dropping everything to follow a man — mental health would be addressed in some way.

“When you are truly obsessed and in love with someone in a way that you are stalking them, you are not going from being super happy about yourself to that,” Bloom said at the Television Critics Association press tour panel for the show in 2015. “Chances are there is some level of depression or anxiety. So we knew we wanted to start with a character who was in a bad place and was then going to look at Josh Chan as an escape instead of looking within herself for the solution…This is someone who is struggling with issues.”

How Rebecca (Bloom) deals with her issues comes to a head when she finally makes a suicide attempt in Friday’s episode. The despair had been building up after her friends discover her suicidal past and after she goes on a vindictive binge in which she lashes out at everyone, goes the full “Swimchan” stalker route, and then sleeps with another ex-boyfriend’s father. At that point, even Rebecca knows she needs to stop and escapes to New York into the arms of her judgmental mother Naomi (Tovah Feldshuh).

Unfortunately, when Rachel discovers her mom’s compassion and care has all been a ruse to slip her anti-anxiety meds, this sends her to her lowest depths. On a plane ride back to West Covina, she takes what remains of the pills all in one go, washed down by merlot. Only when she’s starting to feel the effects does she make one last cry for help by reaching out to the kind flight attendant on board.

At a recent screening and Q&A with the press, co-creator Aline Brosh McKenna revealed that the suicide attempt had been a possibility for a while.

“It’s something that we knew we were going to do, that she was going to bottom out. It’s something we set up early in the pilot, that she has a history of suicidality,” she said. “We didn’t really know the specifics of the ‘how’ until this year.

“We always felt like she was falling off the side of a mountain and sort of grabbing at roots and trees and brambles and she’s kind of plummeting,” she continued. “The last thing that she grabs onto is Naomi (Tovah Feldshuh) because she doesn’t really have anywhere else to go. Obviously the pathologies are not any different than they were, and so when there’s that little burst of hope, and when that’s taken away from her, she really doesn’t know what to do. I think she feels she’s really out of options in that moment.”

The CW

It makes sense that it’s her mother that tipped her over the edge. Not only has she known Rebecca the longest, but she also was there for her daughter’s first attempt. That Rebecca feels a certain amount of hope when it seems they’re getting along just sets her up for her fall. This is demonstrated in the bubblegum pop song, “Maybe She’s Not Such a Heinous Bitch After All,” which IndieWire’s Steve Green delves into here.

“I think that the ‘Heinous Bitch’ song is one of the best songs that the team has ever written because it does blend those tones,” Brosh McKenna said. “It’s very funny, but it’s also very dark and it shows you how low her expectations are for her mom.”

Both Rebecca’s suicide attempt and her acknowledgment that she needs help at the end will necessarily change how the show proceeds. Now, everything is out in the open, with Rebecca taking responsibility for her actions. Previously, everyone had turned a blind eye to some of her more erratic behaviors, sometimes making excuses for her or other times accepting her denials and falling victim to gaslighting.

The show also starts to examine how Rebecca’s behavior has affected her friends. In Friday’s episode, we see how her friends and office colleagues back in SoCal react to her absence when new lawyer Cornelia Wigfield (Bayne Gibby) joins the firm.

The CW

“For better or for worse, [Rebecca] really has a strong impact on everyone,” Brosh McKenna said. “We’ve seen great ways that she’s helped people figure out their own truths, but obviously she’s had negative consequences too and in her absence everybody has to think about how they feel about her, what they want from her. We decided to approach this from the point of view of someone showing up who kind of is all the things that she isn’t.

“Balancing those tones was a challenge in the writing as Jack [Dolgen] was writing it, as we were working on it in the room, and also finding the right actress to play Cornelia,” she continued. “Bayne was somebody I was a huge fan of from ‘The Comeback.’ I think that she nails that kind of friendly blandness that is the contrast to Rebecca’s ability to get into it with people right off the bat.”

Going forward, the show will dive deeper into the clinical side of Rebecca’s issues.

“[The next episode] is really something we’ve been talking about for a long time, which is sort of naming what her issue is and really digging into that and really figuring out what that’s about,” said Brosh McKenna. “We did a ton of research and talking to people to really kind of get that diagnosis across.”

”Crazy Ex-Girlfriend” airs Fridays at 8 p.m. ET on The CW.

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.