Accepting them for what they are. They are part of you. Trying to focus on something else doesn't help because your mind will keep going back to them because of the way it functions.
For example if I say to you don't think of a polar bear, the next thing you're going to think is a polar bear, because your mind is checking if it thinks of a polar bear.
The suicide thoughts become dangerous when you're like me and put them into practice, systematically destroying yourself.
I got to the bit where I say to myself, I'm suicidal, there's no shame in it. I hope I'll die soon, and they tend to subside.