Struggling with depression, Robin Williams tried to cut his wrist and hanged himself with a belt in a bedroom of his San Francisco Bay Area home, officials said Tuesday.

Williams was last seen alive by his wife Sunday night when she went to bed, Marin County Sheriff’s Lt. Keith Boyd said. She woke up the next morning and left, thinking he was still asleep elsewhere in the home.

Shortly after that, Williams’ personal assistant came to the Tiburon home and became concerned when Williams failed to respond to knocks at a door. The assistant found the 63-year-old actor clothed and dead in a bedroom.

Boyd said all evidence indicates Williams, star of “Good Will Hunting,” “Mrs. Doubtfire,” “Good Morning, Vietnam” and dozens of other films, committed suicide. But he said a final ruling will be made once toxicology reports and interviews with witnesses are complete.

Williams had superficial cuts on his wrist, and a pocketknife was found nearby.

Williams had been seeking treatment for depression, Boyd said. He would not say whether the actor left a suicide note.

Word that the actor had killed himself left neighbors in Tiburon stunned and sparked an outpouring of praise among his Hollywood colleagues. Williams had lived in the quiet, waterfront neighborhood for eight years, according to neighbors.

Noreen Nieder said Williams was a friendly neighbor who always said hello and engaged in small talk. Nieder said she wasn’t close to Williams and his family, but she still felt comfortable enough to approach him and ask him about his latest stint in drug and alcohol rehabilitation.

“He was very open about it,” Nieder said. “He told me he was doing well.”

Makeshift memorials of flowers and notes popped up around the country including on his star on the Hollywood Walk of Fame, at his Tiburon home and outside the Boulder, Colo., house where Williams’ hit TV show “Mork & Mindy” was set. People also gathered to remember Williams at a bench in Boston’s Public Garden where he filmed a scene for “Good Will Hunting.”

Ben Affleck, a co-star and co-writer on that movie, was among the legions of friends and fans who shared tributes online.

“Robin had a ton of love & did so much for so many,” Affleck tweeted. “He made Matt & my dreams come true. What do you owe a guy who does that? Everything.”

The Oscar-winning actor for years dealt with bouts of substance abuse and depression and referenced his struggles in his comedy routines. Just last month, Williams announced he was returning to a 12-step treatment program.

The circumstances of the death do not help explain what motivated him, suicide experts said. Understanding that would require a detailed “psychological autopsy” that includes the review of medical and other records, and interviews with family and friends.

These experts stressed that suicide rarely is triggered by a single factor, such as depression or substance abuse. Typically there are at least two such influences, often compounded by acute stress, such as from financial hardship or troubled personal relationships.

“We know from decades of research that there are numerous factors that contribute to suicide risk,” said Michelle Cornette, executive director of the American Association of Suicidology.