Robin Williams' apparent suicide has put a spotlight on the dark side of comedy. Williams, like many comedians, lived with long-term depression and addiction.
Experts say these mental illnesses are no laughing matter.
"Comedy can often be a defensive posture against depression," said Deborah Serani, a clinical psychologist who treats performers with depression and other mental health problems.
Serani, author of the book, "Living With Depression," said that for many comedians, humor is a "counter phobic" response to the darkness and sadness they feel. Their intelligence, she said, helps them put a funny spin on their despair.
Actor Robin Williams Is Dead at 63
Inside Robin Williams' Troubled Life
SLIDESHOW: Robin Williams' Best Roles
"They often wear what we call 'the mask of depression,' which helps them put on a more acceptable face to the world," she said. "But behind that mask there is a terrible struggle going on. There is a stigma about depression and oftentimes the laughter distracts from feelings of weakness."
Williams spoke openly about his lifelong battle with addiction, alcoholism and depression. In 2006, he checked himself into rehab after a relapse, and then checked himself in again for undisclosed reasons last month.
He is certainly not the only comedian who has ever lived with depression and addiction. Comedian Marc Maron has spoken publicly about having severe depression. So has stand-up comedian Jim Norton. John Belushi, Chris Farley and Greg Giraldo all died of drug overdoses. And in 2007, Richard Jeni committed suicide by shooting himself in the face.
The reason so many comedians are at risk for mental illness is because being funny is not the same thing as being happy, said Dr. Rami Kaminski, a professor of psychiatry at Columbia University School of Medicine. He said he believes many comedians mine humor as a way to escape depression and anxiety.
"It's like someone who is afraid of heights but chooses to take up skydiving," he said. "If they are funny all the time, maybe they will be able to feel a little bit better."
Dr. Michael Clarke, the vice chairman for clinical affairs in the department of psychiatry and behavioral science at the Johns Hopkins School of Medicine, said research shows that, in general, creativity and mental illness often go hand in hand.
"People with a more creative side do seem to have a greater rate of mood disorders like depression and bipolar disorder," he said. "We don't know exactly why this is but it could have a biological basis in the emotional centers of the brain."
However, Clarke said, not every comedian is mentally ill. He added that mental illness usually hampers creativity -- so that when someone is in a depressed state, they are often less productive.
"Illness can inform someone's work but when we are talking about mood disorders we are talking about disease states of the brain. Their thinking is impaired and they aren't always capable of making good decisions," he said.
Kaminski said Williams may have been in this impaired frame of mind when he decided to commit suicide.
"Many comedians tend to be depressed because they are trying to get out of their dark world by being funny," he said. "But only those that are clinically depressed are at risk for committing suicide."
Williams' Apparent Suicide Puts Light on Comedy's Dark Side