Yoga is just as much about mind as it is body. Hatha yoga for example involves poses (known as asanas), controlled breathing and some type of meditation.
Yoga helps with breathing, and with conditions like anxiety, breathing properly is important. When someone is anxious, breathing becomes very shallow and difficult. Yoga can help someone to relax and change breathing patterns.
Many people use yoga therapy to help manage anxiety and depression. It can even be used as part of mindfulness based stress reduction therapy.