My situation is a bit different, considering I actually do experience suicidal thoughts in a depressive way lmao but if the case is that you truly don't want to end your life and have these thoughts similar to "hm, what if I jumped off that cliff one day," here's my two cents:
Personally, I think you should tell someone. It doesn't have to be now, or even anyone you actually know, but it's a tale as old as time: Holding things in only worsens the problem the longer you do so. A therapist is obviously the #1 recommendation, but if you can't have one, hotlines and forums may be good alternatives. I don't think a suicide hotline is specifically reserved to just suicidal intent, as many people call them just for advice on how to handle suicidal thoughts (once again, this may be a bit different to your situation, but it wouldn't hurt to try). There's also mental health hotlines in general, which definitely handle intrusive thoughts :0 Online communities are also created with specific purposes and a forum handling intrusive thoughts doesn't sound that hard to find! It's been a while since I lasted used Reddit, but the site/app did have a lot of good mental health subreddits that gave support and advice for a variety of issues. Though, I'd take caution in residing in an anonymous online space that only talks about dark topics! Don't wanna accidentally worsen your mental state, haha.
As for actually handling the thoughts themselves, distractions (ex: video games, watching a show, reading, etc.) can actually be good if the thoughts are truly extreme and severe (AKA distressing). Though, I wouldn't recommend them as a long-term solution :/ Journaling your thoughts is more beneficial, as you can use what you wrote as a sort of starting point on what you want to address within yourself (because, yeah....you're gonna actually have to analyze your mental health and put in effort to improve its flaws u_u.....dont worry, i hate it, too). Why do you feel this way? Or, really, what triggers these thoughts? Is there anything you can do to trigger these thoughts less? <-- Asking yourself questions like those could help you achieve that sense of understanding the problem(s) and what you can do to make them less burdening. A therapist can explain this WAY better than I can but, eh, you gotta work with what you have. Oh, and I'm bringing this back to my point of you having to tell someone: While it's not impossible to do all this self-reflection by yourself, it's gonna be harder to do it alone compared to doing it with a support system. That's why I really want to emphasize my point that you really, really need to tell a person what you're feeling because it'll be so much easier for you in the long-term of things.
I can't really say exactly what you should and shouldn't do since I'm no expert, so those paragraphs are merely just suggestions. However, I guess having some point to start from is better than nothing ¯\_(ツ)_/¯ I wish you the best, and good luck with wrangling those thoughts <3