Robin Williams apparently suffered from a severe degenerative neurological disorder called Lewy Body Disease. In this article, his wife recounts the months leading up to his suicide. Her story makes his decision to commit suicide much more understandable.
https://n.neurology.org/content/87/13/1308
https://n.neurology.org/content/87/13/1308