It might be helpful to reach out to him and express your concern and support. Let him know that you care about his well-being and that you are there for him if he wants to talk.
However, it's also crucial to respect his boundaries and give him space if he needs it. If he is going through a challenging time with his mental health, he might need some time to focus on himself and seek help from healthcare professionals.
Ultimately, the best course of action is to communicate openly and honestly with your ex-boyfriend, encourage him to seek professional support if he hasn't already, and take care of yourself as well during this difficult time. If you have concerns about his well-being or safety, don't hesitate to reach out to his friends, family, or appropriate mental health resources to ensure he gets the help he needs.