Happiness = Health + Money + Social Life + Meaning
Depression makes you less healthy. --> Insomnia is a typical symptom of depression!
Also, there is a positive feedback-loop between health and happiness.
Isn't happiness a state of mental health?
Good self-esteem is definitely one of the primary components of mental health. I don't know if it is the most important, though.