“Because you did not serve Hashem, your G-d, amid joyfulness and goodness/gladness of heart, when everything was abundant” (Devarim 28:47)
Which service is called joyfulness and goodness of heart? This is the service of song (Arachin 11a).
“Serve Hashem with joy, come before Him with glad song” (Tehillim 100:2)
The only place that joy has in this world is in the service of Hashem. The only place in the holy works where joy is extolled is in regard to serving and comprehending Hashem. No food or drink or joy of this world will accompany a person to the Next World, besides for the joy of doing His will (Kad Hakemach, Joy).
“A glad heart is beneficial, but a broken spirit shall become dry to the bone” (Mishlei 17:22)
Rashi says that when a person is happy, his face shines.
The Ralbag expounds: A person with a happy heart will look at things in a positive light, whereas a person with an angry heart will be filled with worry and depression.
“So I praised joy, for man has no other goal under the sun but to eat, drink and be joyful: and this will accompany him in his toil all the days of his life that G-d has given him beneath the sun” (Kohelet 8:15)
>Rashi says that a person should be satisfied with his lot and involve himself in studying Torah, which brings joy. He should not be immersed in the pursuit of materialism, which leads to extortion, taking interest, and thievery. He should likewise not over-indulge in food and drink. He should be happy with the portion Hashem has allotted him.
Our Sages teach that one should not approach prayer with sadness, gaiety, banter, lightheadedness, or idle talk, but rather, with the joy of doing a mitzvah (Berachot 31a).
Rabbi Yonah says that Yonah ben Amitai would ascend to the Beit Hamikdash on the Festivals. He participated in the Simchat Beit Hasho’eivah celebrations and thereby acquired Divine inspiration. From this we learn that the Divine spirit rests only on a happy heart (Yerushalmi, Sukkah 22b).