How to avoid suicidal and frustrating thoughts?

First and foremost argument against suicide is 'Suicide does not solve problem. In fact, it adds to the problem.' Death is not the end of suffering but it is the beginning of more sufferings.

Similarly frustration too overcast the power of rational thinking. And then it leads to wrong decisions leading to more frustration.

On suicide, soul comes out of the body and even after repeated tries, it cannot re-enter the body that it left. Soul then repents a lot.

If suicidal or frustrating thoughts enter the mind, they start forming link. Those thoughts comes back to you again again. This link then leads to the decision.

Therefore, this link must be broken by taking mind to some other things in which mind had interest in. Be with group. Do not allow such person to be alone. After some time when the link is broken, suicidal or frustrating thoughts will vanish.