I have dealt with 3 suicides, 2 attemped and one actual, and my son is highly qualified in this and I have talked to him about it, although complex there are two definite main reasons in my limited experience.
1/. Attempted where they don't really mean it and are looking for compassion or help
2/. The worst - silent ones who simply do it, no talking and no warning
in 1/. (your friends) he has had a tragedy, or is clinically depressed (they talk about a black hole of despair), obviously he needs professional help but you can help by understanding and being compassionate, keep an eye out as often they repeat. Do not leave him alone at first as it is a vicious spiral, I still do not understand how they get there but it is very very hard to recover, do your best but don't feel remorse yourself.