Other people have mentioned some very good reasons for staying alive. Caring about your family and friends, knowing that you're not thinking rationally, realizing that things will improve, being responsible enough to avoid making others lives worse, or just not having giving up as part of your self-image.
Another one that nobody mentions is fear, and it was (
ironically) one of the biggest factors in keeping me alive when I was depressed enough to attempt suicide. Not just fear of killing myself (which did stop me once or twice when I got to the point of having a knife against my throat), but also the fear of failing. I didn't want to have to look at people and have them know that I had tried to kill myself. Plus, I'm enough of a control freak that I certainly didn't want to wind up in involuntary psych care. 96% of suicides attempts fail (701K of 730K attempts per year in the US).
Yeah, I'm another one of those people who was suicidal, eventually got treatment, and is now a fairly happy person. I even like myself, most days. I'm sure you're thrilled for me.
One thing I learned to do, when I was depressed, was worry about someone else. Even when I felt terrible about myself, I always still had empathy. I still cared about my friends, and if I could involve myself in trying to solve their problems, I frequently forgot about my own... at least long enough that when I did think about them, I was in better shape to deal with them, and feeling like I had done something good and been a good person. Hopefully, you still care about other people, too.
I'm likely not doing much good here. Having a hard time finding the words, today. Good luck, my thoughts are with you.
. . . . . . . -- Eric