I have Bipolar 1 & get suicidal ideation regularly. A lot of mine is intrusive thoughts, like seeing myself gone. These I have no control over, but my antipsychotic prn works. Some of it is habit, if that makes sense. The thoughts are comforting and they stick. I've had to work really hard at replacing them with thought blocking and replacing them with other thoughts. CBT. Just realizing that I had some control helped me. Hope this helps.