On the other hand it can have negative effects. I soon started running too much (probably as an escape). This then developed into somewhat of an addiction, which coupled with eating problems became a full blown eating disorder(exercising for like 6 hours a day and not eating much...), So yeah, it can be bad as very easily becomes the only way to escape and this makes it addictive.
Weirdly, running worked the other way for me. I started running because I had an eating disorder, and ended up really ill. My dad eventually let me jog around the block because I was so miserable not being allowed to even walk anywhere, and it made me feel happy to be alive (at the time I couldn't even remember ever having been happy). I've struggled with an eating disorder for several years now, but I love running so much that it's helping me eat. Signing up for a marathon was probably the best thing I could have done - it's given me a goal to aim towards that doesn't involve weight loss, and I know I have to fuel long runs properly. Two months ago, I only ate vegetables. This morning, I had a bowl of porridge (admittedly a small one, but I actually ate stodge). It might sound silly to most people, but it's a life-changingly huge deal for me.
I don't think running is a cure-all solution for depression, for reasons that others have already mentioned, but I do think it's a really important aspect of coping with mental health problems. Although there are potential risks - exercise addiction, injury, beating yourself up for not doing well enough - the general feeling of improved health, and the opportunity to spend a little time away from whatever problems are contributing to the depression, have to be an improvement to hiding away inside and thinking that you don't deserve to be seen.