But there is a thought that always kept me from even thinking of suicide:

Being miserable is better than not being at all

Chance has it that this is the only life we will ever head (although your favorite religion may tell you otherwise). Couldn't it be that (let's not let that sound pathetic) even one good moment is worth it for not calling it off completely? Ever played some ball and quit after you thought you were going to lose anyway, and than sat at home and regreted that you hadn't given it another shot? I know how it is to be depressed, but really, being alive means being given a chance to be happy, because after your death, the linear function that is your mind will disintegrate and your personality and everything you are will be wiped out forever. Admit that this would be a loss.