Likutei Moharan· Rabbi Nachman of Breslov
Likutei Moharan I, 169:4
I further found that this is the aspect of "And God will keep for you the covenant." For when you merit joy, then God, blessed be He, Himself will keep the covenant for you, that is, He will help you to guard the holy covenant. For the main blemish of the covenant is through sadness, as is known.
For the blemish of the covenant comes through the well-known kelipah which is called Lilit, so named because she always wails [meyalelet], which is the aspect of sadness.
And therefore the essential guarding of the covenant is merited through joy, for through joy one merits that God, blessed be He, Himself will help him to guard the holy covenant, as mentioned above.
View original Hebrew
עוֹד מָצָאתִי, שֶׁזֶּהוּ בְּחִינַת: וְשָׁמַר ה' לְךָ אֶת הַבְּרִית. כִּי כְּשֶׁתִּזְכֶּה לְשִׂמְחָה, אֲזַי הַשֵּׁם יִתְבָּרַךְ בְּעַצְמוֹ יִשְׁמֹר לְךָ אֶת הַבְּרִית, דְּהַיְנוּ שֶׁיִּהְיֶה בְּעֶזְרְךָ לִשְׁמֹר אֶת הַבְּרִית קֹדֶשׁ, כִּי עִקַּר פְּגַם הַבְּרִית הוּא עַל־יְדֵי עַצְבוּת כַּיָּדוּעַ,
כִּי פְּגַם הַבְּרִית בָּא עַל־יְדֵי הַקְּלִפָּה הַיְדוּעָה, שֶׁנִּקְרֵאת לִילִית, עַל שֵׁם שֶׁמְּיַלֶּלֶת תָּמִיד, שֶׁזֶּהוּ בְּחִינַת עַצְבוּת,
וְעַל־כֵּן עִקַּר שְׁמִירַת הַבְּרִית זוֹכִין עַל־יְדֵי שִׂמְחָה, כִּי עַל־יְדֵי שִׂמְחָה זוֹכִין שֶׁהַשֵּׁם יִתְבָּרַךְ בְּעַצְמוֹ יַעֲזֹר לוֹ לִשְׁמֹר אֶת הַבְּרִית קֹדֶשׁ כַּנַּ"ל.Read this passage within Part I · Torah 169, in its full context