Suicidal thoughts are very serious, and if you have them, you really do need to be in therapy
When those thoughts come upon you, tell yourself "Not now." It can be nearly impossible to put away the thoughts forever, as something you won't think about doing, but you can delay yourself with the, "Not now." Many people think they need that way out of life, as an option for if or when things get "really bad." You don't really, you can live, but it doesn't feel that way to you at the time.
When those times come tell yourself, "Not now." You can always keep it as an option, just not for now.