I find that, like voices people hear, the way we approach the thoughts in our head go a long way to helping us find peace with ourselves. Our approach and view towards issues like suicidal thoughts or voices in our heads are culturally biased and shape the way we react to them. I don't know where you live, but if you live in the states, you live in a place where such things aren't "normal" and people go to great lengths to deny they ever experience such things, for fear of being seen as abnormal. "Discovery" of such behavior just compounds pre-existing anxiety and is ultimately self-destructive.
Instead of viewing your suicidal thoughts as something to actively avoid or fear, know that thoughts like that, and weird thoughts like shoving people to their death, or caving people's faces in, etc. all come across our minds because the mind is constantly trying to come up with elaborate solutions to possible problems it foresees. Like, hey, the act of living is intolerable in the present moment? Jump out of a plane with no parachute, the scumbag brain says, that'll end well! Hey, that guy in front of you in line for coffee is being a douche? Taze him!
Such thoughts are entertaining to entertain, but know that we all come across them, as much as "normies" would like to deny. A sudden uptick or increase in suicidal thoughts or other-harming thoughts might indicate that your stress levels are creeping up on you, so coming up with non-harmful ways to mitigate the underlying sources of stress might serve you well in the long run. Stressors are sometimes nearly unavoidable in the present day (our society is structured to stress us out and remove us from the social ties that naturally alleviate stress), but you can do things that range from exercise, to walking, to keeping in touch with people, to daily intake of hugs quotas, etc. to keep your baseline stress level in check.
Also, I find that the idea of suicide is culturally stigmatized because of the whole "it's a sin" thing in the US, which itself stems from our orientation as a growth-based (population growth, economic expansion) society which shuns anti-baby-making activities (othersexuality etc.), when it's actually quite natural for organisms to make checks to ensure that we're actually putting along on the right course. And suicidal thoughts are the mirror of people with violent/murderous thoughts, which are themselves quite frequent in the general population, as much as people don't like to admit. (Sort of like how batman has contingency plans for everyone, but darker)
Take care, friend!