כל עצבון בא מפני החטא, והתשובה מאירה את הנשמה ומהפכת את העצבון לשמחה. העצבון הכללי שבעולם מקורו הוא בזוהמת הכלל הנמצא בחללו של עולם, מחטאת הרבים והיחידים, ומחטאת הארץ הכמוסה, שיצאה לפועל בחטאת האדם, שצדיקים יסודי עולם, ומשיח ביחוד, שב בתשובה על מהות חטא זה ומהפכו לשמחה. [ש"ק א' תשכ"ג]
Sadness comes because of sin. The word "חטא" means lacking, as in
"והיה כִּשְׁכַב אֲדֹנִי המלך עִם אֲבֹתָיו (ואדֹניהו ימלוך תחתיו), וְהָיִיתִי אֲנִי וּבְנִי שְׁלֹמֹה חַטָּאִים" (מל"א א, כא).
Teshuva shines into the Neshama and transforms sadness into joy. The general sense of sadness in the world comes from the collective impurity that pervades existence, due to the sins of the community individuals and from the hidden sin of the earth [see Bresishis 1-12] that ultimately led to the sin of man that Tzadikim the foundation of the world and particularly Moshiach do Teshuva for the essence of this sin [i.e. the general sin of the world] and transform it to joy.
Some depressed people think that if they will do various Aveiros they will feel better. It could be drugs, alcohol, pornography and other breaches of Kedusha, sleeping late, being lazy and not learning, not thinking about others while being hyper focused on oneself etc. etc. It NEVER works. It is simply rubbing salt on an open wound and just makes things worse.
The problem with psychologists [even though it is my contention that almost everybody should be seeing one - no less the psychologists themselves] is that they ignore to a certain degree the needs of the soul. Part if not all of the problems stem from the fact that the soul is lacking and needs to reconnect to the Source of all good and joy. So how many therapists will say - "You need to come ten minutes early to davening so that you have ample time to say each word with feeling. That will make you feel MUCH better". But li-myseh - IT DOES!! "You need to learn Shev Shmatsa or Minchas Chinuch. You'll see. It will make you feel elevated, energized and excited".
How utterly MIRACULOUS it is to see people who are "shteiging" in learning and it makes them so happy. I have no rational explanation. I have never witnessed someone deeply engaged in the learning process who was not getting some degree of pleasure not found in other areas of life. For some it is daf yomi, others daf shavua, others semichas chaver and for others - learning three shtark sedraim in Yeshiva or Kollel. But learning has a magical effect on all.
So does chesed. Maybe it is counterintuitive but the less one thinks about oneself and one's own needs [beyond his basic needs] and the more he is focused on giving and serving - the happier he is. Period. The more money he gives away and doesn't spend on himself - the more fulfilled he is. This is not from a mussar sefer [not that that shouldn't be enough] - this is from scientific research. I heard it MEFURASH from the mouth of the famed happiness scientist and Harvard Prof. Arthur Brooks.