If it were purely an issue of mental health, you’d expect a more equal distribution between the genders. 60 of the last 61 mass shooters in the US were men, predominately young and white.
There are a number of extremely interwoven and complicated social/cultural factors at play.