Sometimes people kill themselves because they have an immense amount of self hatred. They don't deserve to live a life that is like put together. Sometimes it's born of things like envy and humiliation and shame. If you're struggling with these thoughts the short answer is, get help. Recognize that there are all kinds of thoughts in your head that will prevent you from getting help.