If you're thinking about suicide, you can brainstorm about anything that it would be nice to do before dying. Big things like traveling to another country, little things like reading a particular book — whatever might add up to a strategy of postponing suicide. Such a strategy, even completely self-consciously pursued, can work.
Also, if you're annoyed because you're ideating without intent, you can make a list of distracting activities that you'll have available when it gets hard to think about anything else. This can be useful along with non-judgmental acknowledgment of the thoughts. When you notice you're thinking about suicide, you deliberately acknowledge it to yourself; think, subvocalize, or just say out loud, "I am thinking about suicide. That is okay. These are only thoughts. People think about suicide sometimes. Now I am going to go do one of my distractors. I might keep thinking about suicide for a while anyway. That is okay. Alright, now I am [playing Tetris]." And so on. Maybe you'll have another intrusive thought about suicide within a couple minutes. So you just acknowledge that one too, and think/say that it's okay.
The point of this is to just let the thoughts be what they are. You're not trying to force them out of your mind, thus you're saving yourself the stress of that difficult or near-impossible task. And you're not making them into a terrible thing that you judge yourself as bad for having. You just tell yourself they're okay, because that's true, they're just thoughts, even if they are uncomfortable you will get through them; you always have before.
- Welcome to Befrienders Worldwide "We listen to people who are in distress. We don't judge them or tell them what to do - we listen."