Exercise itself is a supported mental health treatment used by many health proffessionals worldwide; although i do believe the affects are stronger for non-athletes or non-trained individuals.
For trained individuals, it's suggested that there is a focus on mental toughness and mindfulness training in order to strengthen the athletes mental state, this can often help with some mental disorders such as anxiety, OCD, depression. Exercise is thought of a prevention method as well as a treatment for some of these conditons.
Many sport psychologists also reccomend that athletes have coping mechanisms for stress and create and maintain support networks and undergo psychological training to prevent or overcome these obstacles.