While it’s been proved that regular exercise is good for the body, structured and repetitive physical activity also benefits our mental health. For those struggling with depression, anxiety and stress, the message is clear: Don’t just pop a pill; try working out.

According to the American Psychological Association, although researchers don’t know how much exercise is needed and which workouts are most helpful, studies show that people who engage in physical activity are less depressed than those who don’t and that exercise can help reduce anxiety.

These effects may largely result from the release of feel-good chemicals in the body called endorphins, a decrease in substances in the immune system that can worsen depression and a warm-up effect that’s calming. In addition, being active improves sleeping habits and relieves stress.

But remember: Working out doesn’t just mean going to the gym. Experts say doing yoga, riding a bike and walking for about 30 minutes are also great activities that enable the mind and body to feel better.