Maimonides discusses how emotions can affect the soul's propensity for truth and divine influence, suggesting that joy and a positive disposition enhance one's receptivity.
בְּרַם, כְּגוֹן דָּא צָרִיךְ לְאוֹדוֹעֵי כְּלָל גָּדוֹל: כִּי כְּמוֹ שֶׁנִּצָּחוֹן לְנַצֵּחַ דָּבָר גַּשְׁמִי, כְּגוֹן: שְׁנֵי אֲנָשִׁים הַמִּתְאַבְּקִים זֶה עִם זֶה לְהַפִּיל זֶה אֶת זֶה, הִנֵּה, אִם הָאֶחָד הוּא בְּעַצְלוּת וּכְבֵדוּת – יְנוּצַּח בְּקַל וְיִפּוֹל גַּם אִם הוּא גִּבּוֹר יוֹתֵר מֵחֲבֵירוֹ, כָּכָה מַמָּשׁ בְּנִצְחוֹן הַיֵּצֶר, אִי אֶפְשָׁר לְנַצְּחוֹ בְּעַצְלוּת וּכְבֵדוּת – הַנִּמְשָׁכוֹת מֵעַצְבוּת וְטִמְטוּם הַלֵּב כָּאֶבֶן, כִּי אִם, בִּזְרִיזוּת – הַנִּמְשֶׁכֶת מִשִּׂמְחָה וּפְתִיחַת הַלֵּב, וְטָהֳרָתוֹ מִכָּל נִדְנוּד דְּאָגָה וָעֶצֶב בָּעוֹלָם. וּמַה שֶּׁכָּתוּב: ״בְּכָל עֶצֶב יִהְיֶה מוֹתָר״, פֵּירוּשׁ, שֶׁיִּהְיֶה אֵיזֶה יִתְרוֹן וּמַעֲלָה מִזֶּה, הִנֵּה אַדְּרַבָּה, מִלָּשׁוֹן זֶה מַשְׁמַע, שֶׁהָעֶצֶב מִצַּד עַצְמוֹ אֵין בּוֹ מַעֲלָה, רַק, שֶׁיַּגִּיעַ וְיָבֹא מִמֶּנּוּ אֵיזֶה יִתְרוֹן, וְהַיְינוּ – הַשִּׂמְחָה הָאֲמִיתִּית בַּה׳ אֱלֹהָיו, הַבָּאָה אַחַר הָעֶצֶב הָאֲמִיתִּי לְעִתִּים מְזוּמָּנִים עַל עֲוֹנוֹתָיו בְּמַר נַפְשׁוֹ וְלֵב נִשְׁבָּר, שֶׁעַל יְדֵי זֶה, נִשְׁבְּרָה רוּחַ הַטּוּמְאָה וְסִטְרָא אָחֳרָא וּמְחִיצָה שֶׁל בַּרְזֶל הַמַּפְסֶקֶת בֵּינוֹ לְאָבִיו שֶׁבַּשָּׁמַיִם, כְּמוֹ שֶׁכָּתוּב בַּזֹּהַר עַל פָּסוּק: ״רוּחַ נִשְׁבָּרָה, לֵב נִשְׁבָּר וְגוֹ׳״, וַאֲזַי יְקוּיַּם בּוֹ רֵישֵׁיהּ דִּקְרָא: ״תַּשְׁמִיעֵנִי שָׂשׂוֹן וְשִׂמְחָה וְגוֹ׳, הָשִׁיבָה לִי שְׂשׂוֹן יִשְׁעֶךָ, וְרוּחַ נְדִיבָה וְגוֹ׳״.
Truly this should be made known as a cardinal principle, that as with a victory over a physical obstacle, such as in the case of two individuals who are wrestling with each other, each striving to throw the other—if one is lazy and sluggish he will easily be defeated and thrown, even though he be stronger than the other, exactly so is it in the conquest of one’s evil nature; it is impossible to conquer it with laziness and heaviness, which originate in sadness and in a heart that is dulled like a stone, but rather with alacrity which derives from joy and from a heart that is free and cleansed from any trace of worry and sadness in the world. As for what is written, “In every sadness there is profit,” which means that some profit and advantage would be derived from it, the phrase, on the contrary, indicates that sadness in itself has no virtue, except that some profit is derived and experienced from it, namely, the true joy in the L–rd G–d which follows from genuine anguish over one’s sins at propitious moments with bitterness of soul and a broken heart. For thereby the spirit of impurity and of the sitra achara is broken, as also the iron wall that separates him from his Father in Heaven, as is commented in the Zohar on the verse, “A broken and a contrite heart, G–d, You will not disdain”; then will be fulfilled in him the preceding verses: “Let me hear joy and gladness…. Restore to me the joy of Your deliverance, and uphold me with a spirit of magnanimity.”