I have been depressed and had SI on and off from childhood on into my 40's(where I now am). I often think of suicide when I am extremely stressed. My therapist told me that is my bodies normal reaction to stress after years of doing that. Now it's automatic. I realize, while it is happening and afterwards that it is not rational, but I have difficulty. My current therapist is helping me overcome this by talking and pointing out just how irrational it truly is. She doesn't talk to me like I'm stupid, but talks me down from where I may be at at that time. Unfortunately, you are not alone in this. I agree with the others. Talking about it helps, as well as the other suggestions on here.
As far as your past. That is what it is, your past. You can no longer fix what happened at that time. You have no choice, I feel, but to go forward and dragging your past with you will not help. I know because this is what I tell myself. There comes a time when you need to forgive yourself. I think, once you learn to do that, the rest starts falling into place. Granted, this is not an easy accomplishment, but it is something to remind yourself when you go to that negative place. Dealing with the here and now is hard enough at times. We don't need the baggage with it. I've left mine on the train, for the most part. ;) Every once in awhile it finds its way back to me.
I wish you a solution that fits you.