The types of exercise that require serious mental concentration are really good for me when I am having trouble with anxiety and depression.
Something like walking or swimming is not good because during this type of exercise I find it hard to control what is circulating around in my mind so I can often get myself worked up. The endorphins or whatever from the exercise aren't enough to counter the effects of my mind stewing on what a freak I was (or whatever). So it is good for my body, but my mind would be better off if I had spent an hour sitting and reading a good book.
But where my mind needs to concentrate on the activity, this diverts my mind from thinking about things that have gone wrong and the combination of physical activity and diverting my mind leaves me feeling really good.
My favourite exercise/ activity for this is horseriding. A couple of years ago (when I lived in a different city) I used to have riding lessons once a week. I'm not a good rider (my balance is quite poor), but I always felt better after riding. I had to concentrate both body and mind in order not to fall off - great motivation!
Dancing is also good. I've been doing Middle Eastern dance for many years. For a long time I found going to the classes very intimidating, but I went anyway (on and off admittedly). For many years of lessons I barely spoke to people in the classes but I did go home and practice and now I am actually quite a good dancer and perform regularly (no, I'm not kidding - I have a serious fear of interacting with people, but no real fear of standing up in front of people and doing something like dancing or speaking). Dancing has become a safe environment for me, I'm now reasonably confident interacting with other dancers.
My opinion is that exercise is generally good for your body, but for it to be good for social phobia, it needs to distract the mind from the unhealthy mental pattens that we have.