The apparent suicide by hanging of 63-year-old actor and comedian Robin Williams on Monday in Marin County, north of San Francisco, has prompted a public outpouring of shock and sadness.

Williams “ha[d] been battling severe depression of late,” according to a statement released by his Los Angeles-based publicist, Mara Buxbaum.

How could a humorist brave enough to play gay and cross-dressing characters and kind enough to perform at numerous charity benefits suffer from debilitating depression?

“I could not be more stunned by the loss of Robin Williams, mensch, great talent, acting partner, genuine soul,” tweeted fellow comedian Steve Martin.

But comedian Ricky Gervais hinted that some people had known or suspected that Williams was depressed.

“He was a lovely man who would keep everyone laughing even if he wasn't feeling good himself. RIP Robin Williams,” Gervais tweeted.

Depression is not always visible to outside observers. Symptoms can range from persistent sadness and apathy, in mild cases, to the inability to get out of bed or eat and driving thoughts of suicide, in severe cases.

Keep Reading: Depression by the Numbers »

A History of Substance Abuse

Perhaps the best indicator that Williams suffered from mental illness was his candid and very public battle with drug abuse. He called the 1982 overdose death of John Belushi “a wake-up call” and he checked himself into rehab for cocaine abuse. In 2006, he again went into rehab, this time for alcoholism.

More than half of drug abusers and one third of alcoholics also suffer from a serious mental illness, such as depression, according to the National Alliance on Mental Illness.

Depression affects 25 million American adults each year; just half of them receive treatment. Among those suffering from major depression, up to one in seven will die by suicide. Men are far more likely to commit suicide than women, and people between the ages of 25 and 65, like Williams, account for half of all suicides.

How to Get Help for Depression »

While depression isn’t curable, there are a number of effective treatments, including counseling, medications, such as selective serotonin reuptake inhibitors (SSRIs) and, in extreme cases, electroconvulsive therapy. Regular exercise has also been shown to help relieve depression.

Most people who seek help for depression eventually find a treatment that works for them. Williams had, according to the Marin County sheriff's office, been seeking treatment for depression at the time of his death.

An Ongoing Investigation

The sheriff's office has said that a "comprehensive investigation" will be required to confirm its preliminary finding that Williams died of suicide by hanging. An autopsy conducted earlier today supported the finding of suicide, but the investigation is ongoing and results of a toxicology test will take at least two weeks, officials said at a press conference Tuesday morning.

Williams’ widow, Susan Schneider, has asked mourners to focus on Williams' life, rather than his death.

“As he is remembered, it is our hope the focus will not be on Robin's death, but on the countless moments of joy and laughter he gave to millions,” Schneider said in a statement.

Williams is also survived by three children from previous marriages: Zachary, 31, Zelda, 25, and Cody, 22.