I'll just give an honest answer to OP. I've had depression for the better part of 8 years. Training in Muay Thai helped me find something to give me focus when other things hadn't been working out for me.
There is a risk, just like there's a risk for everyone to take up boxing, and the risk is real. You need to accept that and make sure you personally are okay with taking up the risk of boxing in general, as well as taking it up as a person who is mentally unwell (and I mean that with the most respect possible). Sinister is right, there is a risk, but it's your choice to make it might be good for you in the long run, it might not, you'll never know if its for you until you lace up the gloves. Best of luck.