He was the funniest guy in the room, something that made it all the harder for friends and fans to accept that beneath that reservoir of frenetic energy and seemingly endless good humour resided demons so dark they could push Robin Williams to suicide.

It was no secret that the Oscar-winning actor had suffered for years from periodic bouts of substance abuse and depression — he made reference to it himself in his comedy routines. But word that he had killed himself Monday at his San Francisco Bay Area home left both friends in the Hollywood community and neighbours in the quiet neighbourhood of Tiburon that he called home equally stunned and grief-stricken.

"It was so sudden and he was such a great guy and it's such a loss to the whole community," said Daniel Jennings who lived across the street from Williams in the quiet neighbourhood where the actor was often seen riding his bike and stopping to talk to neighbours. One thing he never did, residents said, was act like a celebrity.

"He was really nice to all the neighbours," Daniels said. "Really appreciated his kindness."

He was last seen alive at home about 10 p.m. Sunday, according to the Marin County coroner's office. Shortly before noon, the Sheriff's Department received an emergency call from the home, where the star of Good Will HuntingMrs. DoubtfireGood Morning, Vietnam and dozens of other films was pronounced dead.

Sheriff's officials said a preliminary investigation determined the cause of death was suicide due to asphyxia. Williams was 63.

"This morning, I lost my husband and my best friend, while the world lost one of its most beloved artists and beautiful human beings. I am utterly heartbroken," said Williams' wife, Susan Schneider. "On behalf of Robin's family, we are asking for privacy during our time of profound grief. 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."

Battle with depression

Williams had been battling severe depression recently, said Mara Buxbaum, his press representative. Just last month, he announced he was returning to a 12-step treatment program he said he needed after 18 months of nonstop work. He had sought treatment in 2006 after a relapse following 20 years of sobriety.

'Robin was a lightning storm of comic genius and our laughter was the thunder that sustained him. He was a pal and I can't believe he's gone.'- Steven Spielberg, director and friend 

From his breakthrough in the late 1970s as the alien in the hit TV comedy Mork & Mindy, through his stand-up comedy act and such films as Good Morning, Vietnam, the short, barrel-chested Williams ranted and shouted as if just sprung from solitary confinement. Loud, fast and manic, he parodied everyone from John Wayne to Keith Richards, impersonating a Russian immigrant as easily as a pack of Nazi attack dogs.

He was a riot in drag in Mrs. Doubtfire, or as a cartoon genie in Aladdin. He won his Academy Award in a rare dramatic role, as an empathetic therapist in the 1997 film Good Will Hunting.

As word of his death spread, tributes from inside and outside the entertainment industry poured in.

"Robin Williams was an airman, a doctor, a genie, a nanny, a president, a professor, a bangarang Peter Pan, and everything in between. But he was one of a kind. He arrived in our lives as an alien – but he ended up touching every element of the human spirit. He made us laugh. He made us cry. He gave his immeasurable talent freely and generously to those who needed it most – from our troops stationed abroad to the marginalized on our own streets," President Barack Obama said in a statement.

Final guest on Carson

Following Williams on stage, Billy Crystal once observed, was like trying to top the Civil War. In a 1993 interview with the AP, Williams recalled an appearance early in his career on The Tonight Show Starring Johnny Carson. Bob Hope was also there.

"It was interesting," Williams said. "He was supposed to go on before me and I was supposed to follow him, and I had to go on before him because he was late. I don't think that made him happy. I don't think he was angry, but I don't think he was pleased.

"I had been on the road and I came out, you know, gassed, and I killed and had a great time. Hope comes out and Johnny leans over and says, 'Robin Williams, isn't he funny?' Hope says, 'Yeah, he's wild. But you know, Johnny, it's great to be back here with you."'

In 1992, Carson chose Williams and Bette Midler as his final guests.

Dramatic range

Like so many funnymen, Williams had dramatic ambitions. He played for tears in AwakeningsDead Poets Society and What Dreams May Come, which led New York Times critic Stephen Holden to write that he dreaded seeing the actor's "Humpty Dumpty grin and crinkly moist eyes."

But other critics approved, and Williams won three Golden Globes, for Good Morning, VietnamMrs. Doubtfire and The Fisher King.

His other film credits included Robert Altman's Popeye, Paul Mazursky's Moscow on the Hudson, Steven Spielberg's Hook and Woody Allen's Deconstructing Harry. On stage, Williams joined fellow comedian Steve Martin in a 1988 Broadway revival of Waiting for Godot.

"Robin was a lightning storm of comic genius and our laughter was the thunder that sustained him. He was a pal and I can't believe he's gone," Spielberg said.

More recently, Williams appeared in the Night at the Museum movies, playing President Theodore Roosevelt in the comedies in which Ben Stiller's security guard has to contend with wax figures that come alive and wreak havoc after a museum closes. The third film in the series is in post-production, according to the Internet Movie Database.

'I dread the word 'art''

In April, Fox 2000 said it was developing a sequel to Mrs. Doubtfire and Williams was in talks to join the production.

Williams also made a short-lived return to TV last fall in CBS' The Crazy Ones, a comedy about a father-daughter ad agency team that co-starred Sarah Michelle Gellar. It was cancelled after one season.

'You look at the world and see how scary it can be sometimes and still try to deal with the fear. Comedy can deal with the fear and still not paralyze you or tell you that it's going away.'- Williams in 1989

"I dread the word 'art,"' Williams said in 1989 when discussing his craft with the AP. "That's what we used to do every night before we'd go on with Waiting for Godot. We'd go, 'No art. Art dies tonight.' We'd try to give it a life, instead of making Godot so serious. It's cosmic vaudeville staged by the Marquis de Sade."

His personal life was often short on laughter. He had acknowledged drug and alcohol problems in the 1970s and '80s and was among the last to see John Belushi before the Saturday Night Live star died of a drug overdose in 1982.

Williams announced in 2006 that he was drinking again but rebounded well enough to joke about it during his recent tour. "I went to rehab in wine country," he said, "to keep my options open." The following year, he told the AP that people were surprised he was no longer clean.

"I fell off the wagon after 20 years and people are like, 'Really?' Well, yeah. It only kicks in when you really want to change," he said.

'Comedy can deal with the fear'

Born in Chicago in 1951, Williams would remember himself as a shy kid who got some early laughs from his mother — by mimicking his grandmother. He opened up more in high school when he joined the drama club, and he was accepted into the Juilliard Academy, where he had several classes in which he and Christopher Reeve were the only students and John Houseman was the teacher.

Encouraged by Houseman to pursue comedy, Williams identified with the wildest and angriest of performers: Jonathan Winters, Lenny Bruce, Richard Pryor, George Carlin. Their acts were not warm and lovable. They were just being themselves.

"You look at the world and see how scary it can be sometimes and still try to deal with the fear," he said in 1989. "Comedy can deal with the fear and still not paralyze you or tell you that it's going away. You say, OK, you got certain choices here, you can laugh at them and then once you've laughed at them and you have expunged the demon, now you can deal with them. That's what I do when I do my act."

He unveiled Mork, the alien from the planet Ork, in an appearance on the comedy Happy Days and was granted his own series, which ran from 1978 to 1982 and co-starred Pam Dawber as a woman who takes in the interplanetary visitor.

"I am completely and totally devastated," Dawber said in a statement. "What more can be said?"

Following his success in films, Williams often returned to television — for appearances on Saturday Night Live, for Friends, for comedy specials, for American Idol, where in 2008 he pretended to be a "Russian idol" who belts out a tuneless, indecipherable My Way.

Quick wit

Williams could handle a script, when he felt like it, and also think on his feet. He ad-libbed in many of his films and was just as quick in person. During a media tour for Awakenings, when director Penny Marshall mistakenly described the film as being set in a "menstrual hospital," instead of "mental hospital," Williams quickly stepped in and joked, "It's a period piece."

Winner of a Grammy in 2003 for best spoken comedy album, Robin Williams — Live 2002, he once likened his act to the daily jogs he took across the Golden Gate Bridge. There were times he would look over the edge, one side of him pulling back in fear, the other insisting he could fly.

"You have an internal critic, an internal drive that says, 'OK, you can do more.' Maybe that's what keeps you going," Williams said. "Maybe that's a demon. ... Some people say, 'It's a muse.' No, it's not a muse! It's a demon! DO IT YOU BASTARD!! HAHAHAHAHAHAHA!!! THE LITTLE DEMON!!"

In addition to his wife, Williams is survived by his three children: daughter Zelda, 25; and sons Zachary, 31, and Cody, 19.