Yes, the state can prosecute people with mental illness. However, a defense attorney may be able to use the issue of mental illness as part of a defense to the charges.
To answer your question "What would happen if this person were to commit suicide because of this?" I would say probably not much. A prosecutor is not likely to dismiss charges just because a person is threatening to harm themselves. And, if a prosecutor is simply doing their job in filing criminal charges, they are unlikely to get in trouble just because a defendant harms themselves.
Nevertheless, a defense attorney would want to know if there is a possibility of their client being suicidal in order to assess how to best help that person. If charges get filed, I would recommend that this be one of the first issue brought to the defense attorney's attention.
The short answer is yes, but there may be some defenses if there was involuntary intoxication. If the person committed suicide then the prosecution will close the case because it would be moot.
Only If and until you and I sign an Agreement for Legal Services, I am not your attorney. These answers are provided for informational and/or novelty purposes