Hi.
Your friend is probably hurt because you spoke to someone else about him being suicidal. I know you meant well, but he probably is ashamed of it and doesn't want others to know. You telling his other friend made him feel like you broke his confidence.
It will take time to gain his trust again, but I think you shouldn't give up on it. Try talking to him, explain to him why you spoke to the other friend who made fun of him. In the end, if time is what he needs, give it to him. Just make sure he understands you care for him and will be there for him when needed.
I hope you patch up your friendship.
All the best!