There is the "altruistic" suicide, like the guy who jumps on a grenade to save his platoon, or the lady with cancer who dies so her family won't have to keep paying her hospital bills. There's the usual suicide which is about escaping pain--whether that's pain from an illness or pain because their boyfriend dumped them or they flunked a test. Usually people do it because they don't think they're good enough to solve their problems.
It's a permanent "solution" to a temporary problem. Whatever you're feeling this bad about, whether it's a lover, a job, your weight--it's temporary.