Reaching out to someone with emotional difficulties can be challenging. Sometimes all it takes is asking how things have been, and checking in from time-to-time.
If you think that your colleague needs more help, you can encourage your colleague to seek professional assistance or direct him/her/they to the company's well-being officer if available.