One issue which is never visited after people commit suicide is the question of standards. I think the reason why people become hoplessly (and clinically) depressed is rooted in the setting of too high standards, not only for others, but for onself. When the person is broken down and finds they can't even do their own standards justice, that is a miserable result indeed.
Sorry, this is a humanistic attitude to suicide (that humans develop bad habits, including mental behaviour through lack of mental discipline), instead of a mechanistic approach (which blames a chemical imbalance which infects the person for no particular reason).
Thus the most obvious way out of this misery is to lower one's standards (temporarily if necessary), and also to learn to be flexible towards oneself (and others).
There is of course another way to rephrase this: stop being so perfectionistic. Sometimes being right, especially all the time, is the fastest route to self destruction.