The Wreck-It Ralph star first felt a shift in her mood when she was 13 when she returned from a class trip, during which she had to hide the fact she wet the bed.

"The trip had been miserable," she tells Glamour magazine. "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 laboured. You are dying. You are going to die. It's terrifying.

"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.'

Silverman eventually began seeking therapists for help and counselling and taking medication, but she knew she had to treat her depression differently when she began to fear she would die from an overdose.

"I went through several therapists. The first one hanged himself. Irony? Yeah. Another one kept upping my Xanax until I was taking 16 a day. Four Xanax, four times a day! I saved all the bottles in a shoe box because I thought, 'Well, at least if I die and they find this, they'll know what happened.' I was a zombie walking through life.

"Then, a few years later, my mom took me to a new psychiatrist, who got me off meds completely over the course of six months. I remember taking that last half pill at the high school water fountain and finally feeling like myself again."

The 44 year old stayed away from medication for six years until she suffered another bout of depression and panic attacks at 22, after she was hired to star on U.S. sketch show Saturday Night Live. She was prescribed a medication to help with the panic attacks and eventually weaned herself off the pills.

"Since then I've lived with depression and learned to control it, or at least to ride the waves as best I can."

Although Silverman feels more confident in dealing with her illness, she still worries it has prevented her from becoming a parent.

"A few years ago, I casually said something in an interview about being afraid to have kids because I might pass depression on to them, but I don't know if I feel that way anymore. I like to think I would therapy through it, instead of helicoptering around my kids in horror that something is wrong with them... A part of me is baby crazy. A part of me goes, 'Why not?' And every day I add, "Freeze eggs?", to the end of my to-do list. Then it keeps getting passed on to the next day's list. Maybe I'll adopt."