So... yeah. Like
@Jaded said, you can't. My best friend committed suicide, and I hate to say, as much as it completely destroyed me and my life when it happened, I wasn't as shocked as I wish I had been. Your friend is walking a fine line and he needs professional help. The outcome here is going to be one of two things - he'll make it or he won't. As someone who has experienced suicide from someone extremely close to me, I would urge you to mentally prepare yourself that it's a very real possibility. I also strongly urge you to try to get him to talk to a counselor. I understand self-preservation, but I wouldn't cut him out entirely. You can limit your conversations, but losing his last friend is the last thing he needs. I know that he's not your responsibility, but if you can manage to find a place where you're okay with understanding that his negativity is a genuine mental illness... it might help him a lot. And lastly, whatever happens... please don't blame yourself for anything. I did not succeed and years later, the guilt still sometimes beats me into a bloody mess.