Having saved a friend from suicide, I have a personal perspective on this issue. Unless you kill yourself while heroically rescuing a busload of children, a train filled with emergency rations or medicine, or something similar, your death will be looked at just as the others above described.
I understand from my experience with my friend that life can become so unbearably painful that death seems like an appealing alternative. She explained it enough times and in enough ways that, combined with some reading on the subject, I accept that some people reach that point.
What you do at that point is critical. Finding a cause to die for is easy; finding a cause to live for is harder (paraphrase from a line in the sci-fi series "Babylon 5"). If you need a cause to keep going, then I hope you'll find one.
Do not kill yourself. For any cause. Period.