If I ever feel like that, which is often, I always think of the impact that actually killing myself would have on others. Just imagine your family and friends reacting to being told that you had killed yourself, or even worse, had found you dead.
I usually come to the conclusion that I am so depressed that I don't care how depressed I am, I'd rather live though the bad bits than make other people suffer.
Also, you probably just want to escape; go to sleep for a long time because everything is too much of an effort.
Killing yourself is final, you can't come back when you feel good again