Commandment 8 - To Walk in His Ways
יְקִֽימְךָ֨ יְהוָ֥ה לוֹ֙ לְעַ֣ם קָד֔וֹשׁ כַּאֲשֶׁ֖ר נִֽשְׁבַּֽע־לָ֑ךְ כִּ֣י תִשְׁמֹ֗ר אֶת־מִצְוֺת֙ יְהוָ֣ה אֱלֹהֶ֔יךָ וְהָלַכְתָּ֖ בִּדְרָכָֽיו׃
יהוה will establish you as God’s holy people, as was sworn to you, if you keep the commandments of your God יהוה and walk in God’s ways.

ואמר רבי חמא ברבי חנינא מאי דכתיב (דברים יג, ה) אחרי ה' אלקיכם תלכו וכי אפשר לו לאדם להלך אחר שכינה והלא כבר נאמר (דברים ד, כד) כי ה' אלקיך אש אוכלה הוא אלא להלך אחר מדותיו של הקב"ה מה הוא מלביש ערומים דכתיב (בראשית ג, כא) ויעש ה' אלקים לאדם ולאשתו כתנות עור וילבישם אף אתה הלבש ערומים הקב"ה ביקר חולים דכתיב (בראשית יח, א) וירא אליו ה' באלוני ממרא אף אתה בקר חולים הקב"ה ניחם אבלים דכתיב (בראשית כה, יא) ויהי אחרי מות אברהם ויברך אלקים את יצחק בנו אף אתה נחם אבלים הקב"ה קבר מתים דכתיב (דברים לד, ו) ויקבר אותו בגיא אף אתה קבור מתים

And Rabbi Hama the sone of Rabbi Hanina said: (Deuteronomy 13:5) "After God you shall walk." And is it possible for a man to walk after the Presence of God? And doesn't it already say (Deuteronomy 4:24) "Because God is a consuming flame"? Rather, [it means] to walk after the characteristics of God. Just as He clothed the naked [in the case of Adam and Chava]… so, too, should you clothe the naked. Just as the Holy One Blessed be He visited the sick [in the case of Avraham after his brit milah]…so, too, should you visit the sick. Just as the Holy One Blessed be He comforted the mourners [in the case of Yitzhak after Avraham’s passing]…so, too, should you comfort the mourners. Just as the Holy One Blessed be He buried the dead [in the case of Moshe]…so, too, should you bury the dead.

ללכת בכל דרכיו, אלו הן דרכי מקום (שמות לד ו) ה' אל רחום וחנון ואומר (יואל ג ה) והיה כל אשר יקרא בשם ה' ימלט וכי היאך איפשר לו לאדם לקרא בשמו של מקום אלא נקרא המקום רחום אף אתה היה רחום הקדוש ברוך הוא נקרא חנון אף אתה היה חנון שנאמר (תהלים קמה ח) חנון ורחום ה' וגו' ועשה מתנות חנם, נקרא המקום צדיק שנאמר (שם יא ז) כי צדיק ה' צדקות אהב אף אתה היה צדיק נקרא המקום חסיד שנאמר (ירמיה ג יב) כי חסיד אני נאם ה' אף אתה היה חסיד לכך נאמר (יואל ג ה) והיה כל אשר יקרא בשם ה' ימלט ואומר (ישעיה מג ז) כל הנקרא בשמי וגו' ואומר (משלי טז ד) כל פעל ה' למענהו.
(Devarim 11:22) "to walk in His ways": Which are the ways of the Holy One Blessed be He? (Shemoth 34:6-7) "The L-rd, the L-rd, G-d of mercy and grace, slow to wrath and abundant in mercy and truth, keeping lovingkindness for thousands, forgiving transgression, offense, and sin, and cleansing …" And it is written (Yoel 3:5) "All who will be called by the name of the L-rd will escape": Now how is it possible for a man to be called by the name of the Holy One Blessed be He? But, (the intent is) just as the L-rd is called "merciful and gracious," you, too, be merciful and gracious, and give gratuitously to all. Just as the Holy One Blessed be He is called "righteous," viz. (Psalms 145:17) "Righteous is the L-rd in all His ways and saintly in all His acts" — you, too, be righteous. Just as the Holy One Blessed be He is called "saintly," — you, too, be saintly. This is the intent of "All who will be called by the name of the L-rd will escape." And it is written (Isaiah 43:7) "… everyone that is called by My name. For My honor I have created him, and formed him, and fashioned him." And it is written (Proverbs 16:4) "The L-rd has created all for His sake." (Devarim, Ibid.)

היא שצונו להדמות בו יתעלה כפי יכלתנו, והוא אמרו ׳והלכת בדרכיו׳. וכבר כפל זה צווי זה ואמר ׳ללכת בכל דרכיו׳ ובא בפירוש ענין זה מה הקב"ה נקרא חנון אף אתה היה חנון מה הקב"ה נקרא רחום אף אתה היה רחום מה הקב"ה נקרא חסיד אף אתה היה חסיד. זה לשון ספרי. וכבר כפל זה הענין בלשון אחר ואמר אחרי ה' אלהיכם תלכו ובא בפירוש שענינו להתדמות למעשים הטובים ולמדות הנכבדות שבהם מתואר יתעלה על דרך המשל. יתעלה על הכל עילוי רב.

That is that He commanded us to imitate Him, may He be exalted, according to our ability. And that is His saying, "and you shall go in His ways" (Deuteronomy 28:9). And this command has already been repeated, [when] He said, "and to go in all of His ways" (Deuteronomy 11:22). And in the explanation, it appears (Sifrei Devarim 49:1), "Just as the Holy One, blessed be He, is called merciful; you too, be merciful. Just as the Holy One, blessed be He, is called pious; you too, be pious." And this matter was already repeated in different words: He said, "Go in the ways of the Lord." And in the explanation, it appears (Sotah 14a) that He meant to say to imitate His good deeds and glorious traits by which God, may He be exalted, is described, by way of analogy - He is exalted over everything with great exaltation. (See Parashat Ki Tavo; Mishneh Torah, Human Dispositions.)
Rambam, Hilchot De'ot 1:5-6

(ה) ... ומצווין אנו ללכת בדרכים האלו הבינונים והם הדרכים הטובים והישרים שנאמר והלכת בדרכיו. (ו) כך למדו בפירוש מצוה זו מה הוא נקרא חנון אף אתה היה חנון מה הוא נקרא רחום אף אתה היה רחום מה הוא נקרא קדוש אף אתה היה קדוש ועל דרך זו קראו הנביאים לאל בכל אותן הכנויין ארך אפים ורב חסד צדיק וישר תמים גבור וחזק וכיוצא בהן להודיע שהן דרכים טובים וישרים וחייב אדם להנהיג עצמו בהן ולהדמות אליו כפי כחו.

5. ...We are commanded to walk in these intermediate paths - and they are good and straight paths - as [Sefer Devarim 28:9] states: “And you shall walk in His ways.”

6. [Our Sages] taught [the following] explanation of this mitzvah: Just as He is called “Gracious,” you shall be gracious; Just as He is called “Merciful,” you shall be merciful; Just as He is called “Holy,” you shall be holy; In a similar manner, the prophets called G-d by other titles: “Slow to anger,” “Abundant in kindness,” “Righteous,” “Just,” “Perfect,” “Almighty,” “Powerful,” and the like. [They did so] to inform us that these are good and just paths. A person is obligated to accustom himself to these paths and [to try to] resemble Him to the extent of his ability.

כי תכלית מעלת האדם – ההדמות בו ית׳ כפי היכולת – כלומר: שנדמה פעולותינו בפעולותיו – כמו שבארו בפרוש ״קדושים תהיו״ אמרו: ״מה הוא חנון אף אתה היה חנון; מה הוא רחום אף אתה היה רחום״. והכונה כולה – כי התארים המיוחסים לו ית׳ הם תארי פעולותיו, לא שהוא ית׳ בעל איכות
We have gone too far away from the subject of this chapter, but we have shown why it has been considered sufficient to mention only these (thirteen) out of all His acts: namely, because they are required for the good government of a country; for the chief aim of man should be to make himself, as far as possible, similar to God: that is to say, to make his acts similar to the acts of God, or as our Sages expressed it in explaining the verse, “Ye shall be holy” (Lev. 21:2): “He is gracious, so be you also gracious: He is merciful, so be you also merciful.” The principal object of this chapter was to show that all attributes ascribed to God are attributes of His acts, and do not imply that God has any qualities.
הַהֲלִיכָה בִּדְרָכָיו כּוֹלֵל כָּל עִנְיַן יֹשֶׁר הַמִּדּוֹת וְתִקּוּנָם. וְהוּא מָה שֶׁבֵּאֲרוּ זַ"ל (שבת קל"ג): מָה הוּא רַחוּם אַף אַתָּה רַחוּם וְכוּ'. וּכְלָל כָּל זֶה שֶׁיִּנְהַג הָאָדָם כָּל מִדּוֹתָיו וְכָל מִינֵי פְּעֻלּוֹתָיו עַל פִּי הַיֹּשֶׁר וְהַמּוּסָר.
Walking in His ways - this includes all matters of uprightness and correction of character traits. This is what our sages of blessed memory explained (Shab.133b) "just as He is merciful, be also merciful..." The general principle of all this is for one to conduct all of his traits in all the variety of his deeds according to what is just and ethical.
וְאָמְרוּ זִכְרוֹנָם לִבְרָכָה (בספרי עקב יא כב) בְּפֵרוּשׁ זֹאת הַמִּצְוָה, מָה הַקָּדוֹשׁ בָּרוּךְ הוּא נִקְרָא רַחוּם, אַף אַתָּה הֱיֵה רַחוּם, מָה הַקָּדוֹשׁ בָּרוּךְ הוּא נִקְרָא חַנּוּן, אַף אַתָּה הֱיֵה חַנּוּן, מָה הַקָּדוֹשׁ בָּרוּךְ הוּא נִקְרָא צַדִּיק, אַף אַתָּה הֱיֵה צַדִּיק, מָה הַקָּדוֹשׁ בָּרוּךְ הוּא נִקְרָא קָדוֹשׁ, אַף אַתָּה הֱיֵה קָדוֹשׁ. וְהָעִנְיָן כֻּלּוֹ לוֹמַר שֶׁנְּלַמֵּד נַפְשֵׁנוּ לָלֶכֶת בִּפְעֻלּוֹת טוֹבוֹת כָּאֵלּוּ וּמִדּוֹת נִכְבָּדוֹת אֲשֶׁר יְסֻפַּר בָּהֶם יִתְבָּרַךְ עַל דֶּרֶךְ מָשָׁל לוֹמַר שֶׁמִּתְנַהֵג בְּמִדּוֹת טוֹבוֹת אֵלּוּ עִם בְּרִיּוֹתָיו. וְהוּא בָּרוּךְ הוּא יִתְעַלֶּה עַל כָּל עִלּוּי גָּדוֹל שֶׁאֵין בָּנוּ כֹּחַ וְדֵעָה לְהַשִּׂיג גֹּדֶל מַעֲלָתוֹ וְרֹב טוּבוֹ וְלֹא בְּכָל הַנִּבְרָאִים, וְעַל הַדֶּרֶךְ הַזֶּה שֶׁאָמַרְנוּ (רמב"ם דעות פ"א ה"ו) יִקְרְאוּ הַנְּבִיאִים לָאֵל בָּרוּךְ הוּא כָּל הַכִּנּוּיִים: צַדִּיק, יָשָׁר, תָּמִים, גִּבּוֹר, חָזָק, רַב חֶסֶד, אֶרֶךְ אַפַּיִם, כִּי בְּאָמְרָם אֶרֶךְ אַפַּיִם אֵין הָעִנְיָן חָלִילָה שֶׁיִּהְיֶה כַּעַס לְפָנָיו לְעוֹלָם, כִּי אֲשֶׁר בְּיָדוֹ לְהָמִית וּלְהַחֲיוֹת, לִמְחוֹת עוֹלָם וְלִבְרֹאת, וְאֵין אוֹמֵר לוֹ מָה תַּעֲשֶׂה לָמָּה יִכְעַס? גַּם כִּי הַכַּעַס אֵינֶנּוּ שְׁלֵמוּת בַּכּוֹעֵס, וְאֵלָיו בָּרוּךְ הוּא כָּל הַשְּׁלֵמוּת. אֲבָל הָעִנְיָן בֶּאֱמֶת עַל הַדֶּרֶךְ שֶׁזָּכַרְנוּ, כְּלוֹמַר שֶׁהֵן הַמִּדּוֹת הַמְּעֻלּוֹת שֶׁמִּתְנַהֵג עִם בְּרִיּוֹתָיו, וְיֵשׁ לָנוּ לִלְמֹד וְלַעֲשׂוֹת כָּל דְּרָכֵינוּ בְּדִמְיוֹנוֹ.
And they, may their memory be blessed, said (Sifrei Devarim 49), in explanation of this commandment, “Just like the Holy One, blessed be He, is called merciful, so too you be merciful; just like the Holy One, blessed be He, is called compassionate, so too you be compassionate; just like the Holy One, blessed be He, is called righteous, so too you be righteous; just like the Holy One, blessed be He, is called holy, so too you be holy.” And the whole matter is to say that we should teach ourselves to follow good actions like these and glorious traits through which He, may He be blessed, is described by way of analogy — to say that He acts with these good traits towards His creatures. But He, blessed be He, is more elevated than any great elevation; as we do not have the power or the knowledge to grasp the greatness of His elevation and the largeness of His kindness — nor do any of the creatures (Mishneh Torah, Laws of Human Dispositions 1:6). And in this way that we have [explained], the prophets called God all [these] appellations: righteous; straight; strong; of great kindness; of long patience. When they said, “of long patience,” the matter is not, God forbid, that there ever be anger in front of Him ever. As why should He get angry — it is in His hand to kill and to make live, to destroy the world and to create; and there is none who says to Him, “What are you doing?” Also because anger is a lack of perfection in the one getting angry, whereas all perfection is His, may He be blessed. Rather the matter is in truth like the way that we described — meaning to say that they are the elevated traits with which He acts towards His creatures; and that we should study and follow His ways, in imitation of Him.
Reciprocation

תניא ר' גמליאל ברבי אומר (דברים יג, יח) ונתן לך רחמים ורחמך והרבך כל המרחם על הבריות מרחמין עליו מן השמים וכל שאינו מרחם על הבריות אין מרחמין עליו מן השמים

It was taught R. Gamaliel Beribbi said: And he shall give thee mercy, and have compassion upon thee, and multiply thee: he Who is merciful to others, mercy is shown to him by Heaven, while he who is not merciful to others, mercy is not shown to him by Heaven.

(רבא אמר) כל המעביר על מדותיו מעבירין לו על כל פשעיו שנאמר נושא עון ועובר על פשע למי נושא עון למי שעובר על פשע רב הונא בריה דרב יהושע חלש על רב פפא לשיולי ביה חזייה דחליש ליה עלמא אמר להו צביתו ליה זוודתא לסוף איתפח הוה מיכסיף רב פפא למיחזייה א"ל מאי חזית אמר (ליה) אין הכי הוה ואמר להו הקב"ה הואיל ולא מוקים במיליה לא תקומו בהדיה שנאמר נושא עון ועובר על פשע למי נושא עון לעובר פשע

Raba said: He who forgoes his right [to exact punishment] is forgiven all his iniquities, as it says, Forgiving iniquity and passing by transgression. Who is forgiven iniquity? One who passes by transgression [against himself]. R. Huna the son of R. Joshua was once ill. R. Papa went to inquire about him. He saw that he was very ill and said to those present, Make ready provisions for his [everlasting] journey. Eventually, however, he [R. Huna] recovered, and R. Papa felt ashamed to see him. He said to him, What did you see [in your illness]? He replied, It was indeed as you thought, but the Holy One, blessed be He, said to them [the angels]: Because he does not insist upon his rights, do not be particular with him, as it says, Forgiving iniquity and passing by transgression. Who is forgiven iniquity? He who passes by transgression.

שוב מעשה בר' אליעזר שירד לפני התיבה ואמר עשרים וארבע ברכות ולא נענה ירד רבי עקיבא אחריו ואמר אבינו מלכנו אין לנו מלך אלא אתה אבינו מלכנו למענך רחם עלינו וירדו גשמים הוו מרנני רבנן יצתה בת קול ואמרה לא מפני שזה גדול מזה אלא שזה מעביר על מדותיו וזה אינו מעביר על מדותיו

It is further related of R. Eliezer that once he stepped down before the Ark and recited the twenty-four benedictions [for fast days] and his prayer was not answered. R. Akiba stepped down after him and exclaimed: Our Father, our King, we have no King but Thee; our Father, our King, for Thy sake have mercy upon us; and rain fell. The Rabbis present suspected [R. Eliezer], whereupon a Heavenly Voice was heard proclaiming. [The prayer of] this man [R. Akiba] was answered not because he is greater than the other man, but because he is ever forbearing and the other is not....