How to get rid of S thoughts?

I’ve been dealing with anxiety and depression for the last 8 years, always going up and down, dividing myself into good and awful moments. Its been a while since I feel ok most of the time, but now all the feelings about unaliving myself are hitting really hard. That is what I’m most terrify about. Any tips on how to control it?