The command itself is sounded in Tehillim 100:2: "עִבְד֣וּ אֶת־יְהֹוָ֣ה בְּשִׂמְחָ֑ה" — worship God in gladness and come before Him with shouts of joy — establishing joy not as an optional mood but as the very manner in which divine service is to be performed.
The Gemara in Shabbat 30b draws a sharp distinction between laughter and joy-of-mitzvah, concluding that "וְשִׁבַּחְתִּי אֲנִי אֶת הַשִּׂמְחָה" refers specifically to the joy that accompanies a mitzvah, and the Gemara in Arakhin 11a derives from the verse "תַּחַת אֲשֶׁר לֹא עָבַדְתָּ אֶת ה' אֱלֹהֶיךָ בְּשִׂמְחָה וּבְטוּב לֵבָב" that the paradigmatic expression of service-in-joy was the Levitical song in the Temple.
Mishneh Torah, Shofar, Sukkah and Lulav 8:15 elevates joy-of-mitzvah into a positive religious obligation of the highest order — calling it "עֲבוֹדָה גְּדוֹלָה" — and rules that one who withholds this joy from himself is deserving of punishment, citing the same verse from Devarim 28:47; רבינו בחיי, במדבר ד כב similarly teaches that joy in performing a mitzvah is itself a mitzvah in its own right and that it constitutes the perfection of service, which is why song accompanied the Temple rites.
Sefer HaIkkarim, Maamar 3 33:1 grounds this theologically: joy gives completion and wholeness to any act, such that the very same deed performed with joy is called a virtue while performed with gloom is called a deficiency — the Torah itself, he notes, ties the blessing for charity to "ולא ירע לבבך" (the heart's attitude) rather than to the act of giving alone.
Mesillat Yesharim 19 synthesizes the Tanach and rabbinic tradition, naming joy the second great branch of love of God and citing both Tehillim 100:2 and the rabbinic teaching that the Divine Presence rests upon a person only through joy of mitzvah (Shabbat 30b); it adds, from the Midrash on that very verse, that when one stands to pray one's heart should rejoice in the privilege of praying to the incomparable God.
Sefer Chasidim 68 and Shenei Luchot HaBerit, Aseret HaDibrot, Shevuot, Torah Ohr 4:43 both grapple with the apparent tension between "עבדו את ה' ביראה" and "עבדו את ה' בשמחה", resolving it by assigning fear to the anticipatory, reflective posture before a mitzvah — lest one be lax — while joy governs the actual moment of performance, so the two dispositions are sequential complements rather than contradictions; מדרשים, מדרש חסרות ויתרות תהלים echoes this resolution, teaching that one's heart should be glad at prayer precisely because one is standing before God, yet awe must still tremble beneath the joy.
Tanya, Part I; Likkutei Amarim 31 anchors the requirement in metaphysics: holiness itself is characterized by "עוֹז וְחֶדְוָה בִּמְקוֹמוֹ," and the Divine Presence abides only within joy, so sadness — even when it stems from remorse over sins — belongs to the realm of kelipat nogah rather than holiness and is appropriate only during confession, never during prayer or Torah study; Tanya, Part I; Likkutei Amarim 26 adds a practical dimension, comparing the conquest of the evil inclination to a wrestling match in which sluggishness born of gloom leads inevitably to defeat, whereas alacrity — which flows from joy and an open heart — enables victory.
Tanya, Part I; Likkutei Amarim 33 identifies the deepest source of this joy: the very proximity of God, which is the entire purpose of human creation and of all the worlds; contemplating this reality, the Tanya teaches, gladdens the heart and causes the soul to exult, and Peirush HaMilos, עבדו את ה בשמחה explains that the joy of service flows specifically from the faculty of binah — understanding and inner comprehension — so that service-in-joy represents a mode of engaged, revelatory consciousness, distinct from the silent nullification of praise.
Likutei Moharan, Part II 24 frames perpetual joy as itself a great mitzvah, stressing that because human nature gravitates toward gloom in the face of life's hardships, a person must forcibly pursue joy by every available means — even levity — reserving a contrite heart for a brief, designated time, and Noam Elimelekh, Sefer Bamidbar, Beha'alotcha 6 teaches that time-bound mitzvot in particular must be performed with joy and cleaving to God so that their sanctity endures as a living force even after the moment of performance has passed.
Chochma uMusar 1 p. 5 teaches that genuine service of God in joy, as referenced in the verse about failing to serve with joy, enables the soul to cleave to the higher realms in prayer, and Chochma uMusar 1 p. 294 sharpens the stakes considerably, holding that failure to infuse one's service with the joy of the Holy One is a grave failing — illustrating the severity with which the Mussar tradition reads the demand of Devarim 28:47.
Sulam on Zohar, Vayikra 109 captures the paradox most sharply: Rabbi Yehuda teaches that every act of service to God must be performed with joy and wholehearted willingness for it to be considered complete — yet immediately raises the difficulty that one who brings a sin-offering, having transgressed, surely stands before God with a broken spirit; this tension between contrition and joy runs through the entire tradition, which resolves it by assigning each disposition its proper place and time.
On the practical halachic level, Rav Eliezer Melamed (Peninei Halakhah, Festivals 1:8) codifies simchah as a positive Torah obligation on festivals, and Rav Eliezer Melamed (Peninei Halakhah, Festivals 1:14) stresses that fulfilling it demands active effort — transcending worry and disappointment to rejoice consciously in God's election, Torah, and covenant — while Rav Eliezer Melamed (Peninei Halakhah, Festivals 1:11) rules, following the Rambam, that a joy confined to one's own table while the poor go unshared is not simchat mitzvah at all but merely the joy of one's own belly, grounding the social dimension of joy in the Torah's text of Devarim 16:14.