If I may share a personal, weird story: I used to be suicidal for years until I somehow managed to flip that mentality around. Now I see death as somewhat of a cheat. Like, I can always die. Why not hang on and see what will happen in the future? Maybe it gets better, maybe not and maybe it will get worse.
I also studied psychology so I know that the above is not the best advice I can give, but that perspective change was somewhat useful for understanding my own struggle.