You have done the right thing, and it was also the only thing you could have done to help.
If someone wanted to jump off the bridge, you wouldn't just say: oh ok, go ahead then, if that's what you want. You just wouldn't agree with someone who's not mentally well, instead you would do what's best for them, even if it's not what they're asking you to do.
By doing what you've done you're also teaching your ex to take responsibility over his wellbeing and to seek professional help, and that's the only route to getting better long term. Sharing with friends provides short term comfort, professional help is there to help build long term coping skills.
All the best. X