I read that Robin Williams was in the early stages of Parkinson's Disease. Michael J Fox has been afflicted with that disease for years yet he chose to live in spite of it and be with his family. While I don't want to dismiss Robin's contributions to film and comedy, he did choose to end his life, leaving his wife a widow and his children without a father. I know I will catch flack for saying this but I'm putting it all in perspective. The use of drugs was his decision.
It is not uncommon for people with depression to self medicate with alcohol and other drugs. They may be undiagnosed, face familial prejudice against having an emotional disturbance, along with societal and, sometimes, religious stigmas. They may also not have access to medical care for medication that can help them.
Even with medication, it can take years to find a correct mix and dosage. Unfortunately, even after a correct mix and dosage is found, the medications can lose effectiveness over the years. So people may "choose" to use alcohol or other drugs to cope.
Robin Williams had open heart surgery a few years ago. Cardiac surgery often causes severe depression. Parkinson's disease is a neurological condition that also cause emotional turmoil. Some website have been reporting that it too can cause depression.
Robin Williams, and others that attempt or succeed suicide, was in crippling emotional pain so severe it is physical. It is hole so deep no ladder can reach the bottom, no voices of love and hope can be heard and where a shining light of rescue is inconceivable.