Sarah Silverman is hilarious and irreverent—but the comedian has also lived through some "very dark years." She opens up about her battle with depression and her gutsiest career move yet. As told to Genevieve Field.

"If there's life after death, I hope there's comedy," says Silverman, 44.

Five years ago I got a phone call out of the blue. A writer named Amy Koppelman had heard me talking about my experience with depression on The Howard Stern Show, and she wanted me to be in the movie based on her book, I Smile Back. The story was about a suburban mother and housewife, Laney Brooks, who on paper has it all, but in reality suffers from depression and self-medicates with drugs and alcohol. I said, "Cool, yeah, sure." It never occurred to me that the movie would actually get made. For that to happen, it would have to have a star attached to it, right?

Three years later I got an email saying, "It's happening, we got the funding!" I replied-all: "Yay!" And then I collapsed on the floor of my bathroom, shaking. What had I done? I knew playing Laney Brooks would take me back to a very dark place.

"Once, my stepdad asked me, 'What does [depression] feel like?' And I said, 'It feels like I'm desperately homesick, but I'm home.'"

I first experienced depression when I was 13. I was walking off a bus from a school camping trip. The trip had been miserable: I was, sadly, a bed wetter, and I had Pampers hidden in my sleeping bag—a gigantic and shameful secret to carry. My mom was there to pick me up, and she was taking pictures like a paparazzo. Seeing her made the stress of the last few days hit home, and something shifted inside me. It happened as fast as the sun going behind a cloud. You know how you can be fine one moment, and the next it's, "Oh my God, I f—king have the flu!"? It was like that. Only this flu lasted for three years. My whole perspective changed. I went from being the class clown to not being able to see life in that casual way anymore. I couldn't deal with being with my friends, I didn't go to school for months, and I started having panic attacks. People use "panic attack" very casually out here in Los Angeles, but I don't think most of them really know what it is. Every breath is labored. You are dying. You are going to die. It's terrifying. And then when the attack is over, the depression is still there. Once, my stepdad asked me, "What does it feel like?" And I said, "It feels like I'm desperately homesick, but I'm home."