The Tanya discusses the inner purification that occurs through giving tzedakah, particularly stressing the higher nature of doing so anonymously and its impact on the soul.
וְהִנֵּה, עִיקַּר הַתְּשׁוּבָה הוּא בַּלֵּב, כִּי עַל־יְדֵי הַחֲרָטָה מֵעוּמְקָא דְלִבָּא מְעוֹרֵר עוֹמֶק אוֹר הָעֶלְיוֹן הַזֶּה. אַךְ כְּדֵי לְהַמְשִׁיכוֹ לְהָאִיר בָּעוֹלָמוֹת עֶלְיוֹנִים וְתַחְתּוֹנִים צָרִיךְ ״אִתְעָרוּתָא דִלְתַתָּא״ מַמָּשׁ בִּבְחִינַת מַעֲשֶׂה, דְּהַיְינוּ, מַעֲשֵׂה הַצְּדָקָה וָחֶסֶד בְּלִי גְבוּל וּמִדָּה, דִּכְמוֹ שֶׁהָאָדָם מַשְׁפִּיעַ רַב חֶסֶד, פֵּירוּשׁ חָ״ס דְּלֵי״ת, דְּהַיְינוּ לְדַל וְאֶבְיוֹן ״דְּלֵית לֵיהּ מִגַּרְמֵיהּ כְּלוּם״, וְאֵינוֹ נוֹתֵן גְּבוּל וּמִדָּה לִנְתִינָתוֹ וְהַשְׁפָּעָתוֹ, כָּךְ הַקָּדוֹשׁ־בָּרוּךְ־הוּא מַשְׁפִּיעַ אוֹרוֹ וְטוּבוֹ בִּבְחִינַת חֶסֶד עִילָּאָה, הַנִּקְרָא ״רַב חֶסֶד״, הַמֵּאִיר בִּבְחִינַת אֵין־סוֹף בְּלִי גְבוּל וּמִדָּה תּוֹךְ הָעוֹלָמוֹת עֶלְיוֹנִים וְתַחְתּוֹנִים, שֶׁכּוּלָּם הֵם בִּבְחִינַת דְּלֵי״ת אֶצְלוֹ יִתְבָּרֵךְ, דְּלֵית לְהוֹן מִגַּרְמֵיהוֹן כְּלוּם, וְ״כוֹלָּא קַמֵּיהּ כְּלָא חֲשִׁיבֵי״, וְעַל־יְדֵי זֶה נִתְקְנוּ כָּל הַפְּגָמִים שֶׁפָּגַם הָאָדָם בַּעֲוֹנוֹתָיו לְמַעְלָה בָּעוֹלָמוֹת עֶלְיוֹנִים וְתַחְתּוֹנִים. וְזֶהוּ שֶׁכָּתוּב: ״עֲשֹׂה צְדָקָה וּמִשְׁפָּט נִבְחָר לַה׳ מִזָּבַח״, לְפִי שֶׁהַקָּרְבָּנוֹת הֵן בִּבְחִינַת שִׁיעוּר וּמִדָּה וּגְבוּל, מַה שֶּׁאֵין כֵּן בִּצְדָקָה שֶׁיּוּכַל לְפַזֵּר בְּלִי גְבוּל לְתַקֵּן עֲוֹנוֹתָיו.
Now the essence of penitence (teshuvah) is in the heart, for through contrition from the depth of the heart one arouses the depth of this Supreme light. But in order to elicit (this light) so that it will radiate in the upper and lower worlds, it is essential that there be truly an arousal from below, in the mode of an action, i.e., an act of charity and kindness that is without limit and measure. For just as man diffuses rav chesed [i.e., ח”ס דלי”ת (he is concerned with him who has not)]—namely to the poor and destitute who has nothing of his own, without setting a limit and measure to his giving and diffusion, the Holy One, blessed is He, likewise diffuses His light and benignity in the mode of chesed ilaah, referred to as rav chesed, which radiates within the upper and lower worlds in a mode of infinitude, without limit and measure. For in relation to Him, blessed be He, all are in a state of דלי”ת, whereas they have nothing at all of their own, and all that are before Him are esteemed as naught. And all the blemishes that man caused above, in the upper and the lower worlds, through his iniquities, are rectified hereby. And this is the meaning of what is written: “to the L–rd, to exercise tzedakah and justice is preferable to sacrifice.” Because the sacrifices are in a mode of quantity, measure, and limit, while charity can be dispersed without limit for the purpose of rectifying one’s iniquities.