I'm thinking of ghosting my suicidal friend
Why do you want to ghost your friend when he is in distress? It's not what a friend would do.
I feel like his depression is rubbing off on me and I don't want to deal with it.
If your friend is having suicidal thoughts, you should seek support for him outside of yourself. Tell someone you trust about what is going on. This way you will not have to carry the burden of this friendship alone and you will have another view of the situation and what is going on.
I can't tell anyone. They might think I'm crazy if I start talking about suicide with them.
You might be surprised at how accommodating people become when the topic of suicide is brought up. If you don't want to talk to people you know about it, you can always talk on the suicide hotline. You are just trying to get advice to help your friend. It's not like you are the one with suicidal thoughts. Those people are angels, and they really know what they are doing, so why don't you give that a shot first?