The person attempting to commit suicide isn't trying to hurt themselves or others, they're trying to end/stop whatever is hurting them.
This is a poor analogy, but when you're on fire and there's no way to put it out and the only way you know of to stop the unimaginably painful burning is to take your gun and shoot yourself in the head to finally stop it once and for all... it doesn't seem like such a ridiculous thing to do. It doesn't matter if there are people who are there trying to put out the flames unsuccessfully who care about you and are trying to help you. At the point, the only thing that matters is stopping the pain, no matter the cost.
This will sound strange to a lot of people, but suicide is a way to protect ones self. It's a result of certain responses that are built into the human mind that may not make much sense because of the end result, but if we didn't have them, we wouldn't have been able to survive as a species since we'd have no concept of protecting ourselves when bad things happen to us that cause us pain. Suicide is a result of so much pain happening to a person that the only way to stop it is to resort to killing ones self.
What I find amusing in all of this is the way people deal with someone who is thinking of committing suicide or is suffering from depression is to blame that person for feeling the way they feel, as if the action they have taken or want to take is some kind of spiteful act toward people around them. They see suicidal people as a person who is making a bad choice when in reality, that person has already tried everything else that is available to them and has already run out of choices available to them. At the moment they're ready to commit to suicide, they have no choices left to them.
It's an illness people suffer from that ultimately leads to suicide. It's a terrible thing for a person to have to go through and it's a terrible thing for people around that person who cares about them who feel like that can't do anything about it... so then why do those people around that person blame the person who is suffering from that illness to begin with?
I mean, we don't blame people for getting cancer, do we? We do everything we can to try to help the person get through it and then abide by their wishes when it gets to the point where that person feels like nothing more can be done for them and they need to let go.
But that's the stigma attached to mental illness... it's more like contracting AIDS than it is cancer... in some cases it's worse. There's something wrong and you need help, but you know there's a stigma attached to it so you try to deal with it yourself without success and when people do finally come in to try to help, in most cases it's already too late and the people who think they're helping, aren't. Then when the person commits suicide, the people left get bitter about it and the vicious little cycle of stigma continues.
As for the issues that may or may not cause someone to commit suicide, those are too many to count. There are plenty of reasons why, the defining thing about suicide is that it's a way to stop the hurt, where the only way to gain a positive outcome for yourself is to end it all.
Finally, for those who think suicide is selfish... yes, that person is thinking of themselves, they're going through something terrible where, as I've said over and over, the only way out is to end it all. They're obviously at the point where all they can think of is a way to stop what is happening to them... but let's turn this around. If someone is going through all of that unimaginable pain, is it selfish to want them to continue going through that just so you feel better?
I mean, we do this all the time... just think of all of those people who send their aging parents to those homes for the elderly but then refuse to turn off the life support machine when it's finally time. People are living in a culture that is so afraid of death but so comfortable ignoring the quality of life... or the lack there of a person has.
In this society, people think it's better to be alive and perpetually in the worst pain that can be inflicted on a person than for them to be dead.
It's easy to have that view when you're not the one feeling what they feel, extremely difficult when you are.