What if you just accept it and stop trying to get over it?
I don’t mean go through with it.
I just mean accept that you have those thoughts. It doesn’t have to “mean” anything that mind your mind goes to suicidal thoughts sometimes or often. It doesn’t necessarily mean you’re not making progress. It just means your mind goes there.
Instead of trying to get rid of the thought the work would be on accepting yourself and building your life.