Do you cling to life? What's the point in living if you eventually die? @rossii
The survival instinct is too strong in most people to go through with suicide. Add to that the thought of your loved ones' suffering (even if you aren't going to be there to witness it), and it becomes an even more difficult task.
So if you can reason out that the chance of you actually committing suicide is really quite low, maybe you can shift start shifting your focus away from it a little bit at a time. The thoughts will continue to surface, but when they do, you can say to yourself 'No, that's not really going to happen, so I'm not going to spend time and energy considering the possibility'. Kind of similar to planning your life based on winning the lottery - it's very likely not going to happen, so it doesn't make sense to invest your thoughts and emotions in that possibility.
As for living, try not to focus too much on meaning and purpose, because that can just send you back down the rabbit hole if you can't find something to focus on that is 'worth living for'. Make sure your basic needs are satisfied - eat, exercise, sleep, build relationships - and make life as interesting and pleasant as possible - find hobbies, interact with people, spend time in nature, avoid excessive use of alcohol and drugs.
These things have helped me get to a place where I feel relatively stable, after having dealt with severe depression on and off for over a decade.
If you are severely depressed, you may need the help of medication and cognitive behavioral therapy to get you started on the right path. Medication can relieve the depressive symptoms and suicidal thinking temporarily, while you begin the work of restructuring your thought patterns and beliefs.