Most drugs are highly effective, in my experience.
Some drugs are ineffective or have contraindications for certain people, and of course, not everyone follows the advice of their doctor, and take drugs together that should not be taken together.
Since Rob Schneider, who is not a doctor and does not even play one on television, does not know what drugs Williams might have been taking, there is no reason for anyone to take him seriously. It is conceivable that some prescription could have had some effect, and everyone has surely heard disclaimers on prescription drug ads that this or that might cause people to think about suicide. But Rob Schneider, like all comedians, seeks publicity.
Pharmaceutical companies have no interest in producing drugs that cause people to commit suicide.