Think of the people you would hurt if you carried out those thoughts.

And I think if you are feeling tempted by suicidal feelings you should seek a professional to teach you how to control the urges. I often have looked out windows or at a tall building and wondered what it would be like to fall. Although I'm too terrified of heights to ever carry that out ^_^"