Rachel Bloom might be one of the funniest actresses on TV, but on the inside, she feels very differently.

The Crazy Ex-Girlfriend star writes a candid essay for Glamour about her battle with depression and how, with help, she got through it. Her lowest point began with a week of pitches for the show that would be her Golden Globe-winning CW series.

"It all started with one sleepless night: Aline [Crazy Ex-Girlfriend co-creator] and I were pitching the show to networks the next day. In my head, this was my chance to 'make it,' which hinged on my performing in those meetings," she writes.

Watch

"I had a friend staying over, and suddenly it was midnight. I said to myself, 'Oh, you stupid bitch! Go to bed. You have a pitch in the morning!' I didn't sleep for a second that night. By the time I met Aline the next day, I looked like I had been hit by a truck."

It was that one sleepless night that launched the nadir of her depression.

"That started a spiral. Every night before a pitch that week, I had sleep anxiety. I became delirious—and afraid that I wasn't sleeping; ergo I would ruin everything," she continues. "But the lack of rest didn't ruin the pitches, and I was good at covering up my anxiety."

Read

But when her boyfriend-turned-husband proposed, Bloom realized she had a bigger problem. "Previously, when we had dated long-distance, I feared that our relationship would fail, and then every time I saw him, I thought about that anxiety," she writes.

"So on this amazing night, my sleep anxiety combined with my old relationship anxiety, and all I could think was, Don't be anxious—if you think about anxiety today, you're going to associate anxiety with your husband for the rest of your life. All this time I was trying to hide my feelings. Aline didn't realize how dark it got; even with my boyfriend I struggled to articulate how bad it was on the inside."

It wasn't until she switched birth control pills that she slipped into "the worst depression" of her life. Only then did she seek help from a psychiatrist instead of her regular therapist. In her essay she writes that each session "improved my life."

"The thing that has most aided me through my anxiety and depression is realizing I'm not alone. I'm naturally bubbly, even when I'm sad. But here's what people can't see: During a spiral the world feels dark," she explains. "I have anxiety about anxiety, then I worry the anxiety will ruin my life. It's a snake-eats-tail loop. But in opening up to others, I found a lot of people have felt the same way."

With the support of her husband and some very relaxing meditation, Bloom falls asleep without a problem these days.