First, thank you for your post and bringing awareness to the effects suicide can have on others.
There's a pain in the mind of someone in that state. They look for ways to stop it and can be overwhelmed. They will try not to show you their thoughts because of the stigma and the impending issue of creating roadblocks to their suicide solution.
If you suspected anything it can be a challenge also as it's hard to know how to support someone , check this out when you have a moment ....
http://www.vice.com/read/how-do-you-cope-when-your-partner-has-depression-144
Reasons are hard to come by for why your friend did that. Knowing always helps with getting closure.
Did they go through a recent trauma? If so, were they isolated and alone alot afterwards?
Mental illness is like a sickness but very different from a cold or flu.
If you don't have a support structure or wellness recovery plan it can be a hard hole to climb out of. Heck, even if you have that, you can let the darkness creep by and get into that state again.
Everyone is different so you will have to let us know what worked for you? Talk therapy, exercise, or whatever. Time does not heal but does give you an opportunity to find ways to cope.