The Talmud derives from the Thirteen Attributes that when Israel acts and 'passes before God' performing the attributes themselves, God forgives them. The discussion treats rachum and chesed as activating different divine responses — rachamim for the suffering and undeserving, chesed for positive giving beyond what is owed.
רַב הוּנָא רָמֵי, כְּתִיב: ״צַדִּיק ה׳ בְּכׇל דְּרָכָיו״, וּכְתִיב: ״וְחָסִיד בְּכׇל מַעֲשָׂיו״! בַּתְּחִלָּה — צַדִּיק, וּלְבַסּוֹף — חָסִיד. רַבִּי אֶלְעָזָר רָמֵי, כְּתִיב: ״וּלְךָ ה׳ חָסֶד״, וּכְתִיב: ״כִּי אַתָּה תְשַׁלֵּם לְאִישׁ כְּמַעֲשֵׂהוּ״. בַּתְּחִלָּה — ״כִּי אַתָּה תְּשַׁלֵּם כְּמַעֲשֵׂהוּ״, וּלְבַסּוֹף — ״וּלְךָ ה׳ חָסֶד״. אִילְפַי, וְאָמְרִי לַהּ אִילְפָא רָמֵי, כְּתִיב: ״וְרַב חֶסֶד״, וּכְתִיב: ״וֶאֱמֶת״. בַּתְּחִלָּה — ״וֶאֱמֶת״, וּלְבַסּוֹף — ״וְרַב חֶסֶד״.
§ Rav Huna raised a contradiction between the two halves of a verse. It is written: “The Lord is righteous [tzaddik] in all His ways” (Psalms 145:17), indicating that God acts in accordance with the attribute of strict justice [tzedek], and then it is written in the same verse: “And kind [ḥasid] in all His works,” implying that He acts with grace and loving-kindness [ḥesed], going beyond the letter of the law. Rav Huna explained: Initially, at the time of judgment, He is righteous, but in the end, at the time of punishment, He is gracious. Rabbi Elazar raised a similar contradiction: It is written: “But to you, O Lord, belongs kindness” (Psalms 62:13), implying that God acts beyond the letter of the law, and then it is written in the same verse: “For You render to a man according to his deeds,” implying that He rewards and punishes measure for measure. Rabbi Elazar answered: Initially, at the time of judgment: “For You render to a man according to his deeds”; but in the end, at the time of punishment: “But to You, O Lord, belongs kindness.” Ilfai, and some say it was the Sage Ilfa, also raised a contradiction: It is written in the list of God’s attributes: “And abundant in kindness” (Exodus 34:6), and it is written in the same verse: “And truth,” which implies the attribute of justice. He answered: Initially, at the time of judgment: “And truth,” i.e., God employs strict justice, but in the end, when He sees that the world cannot survive on judgment based only on truth and justice: “And abundant in kindness,” i.e., He is merciful.