לדוד אל תתחר במרעים. זה שאמר הכתוב (משלי כג יז) אל יקנא לבך בחטאים. ובמה תקנא (שם) ביראת ה' כל היום. אל תקנא בנרן של רשעים. ראה כמה שמן יש בו רביעית או שמינית (אין לו אחרית) השמן שלם והנר מתכבה. וכן הוא אומר (שם כד כ) לא תהיה אחרית לרע. ואומר (שם) נר רשעים ידעך. הלכה האורה שלו. לכך דוד אומר אל תתחר במרעים. קנא בנר שאינו נדעך לעולם ואין הנר שלו פוסקת. שנאמר (שם ו כג) כי נר מצוה ותורה אור. לכך אל יקנא לבך. אמר הקב"ה קנא לי שאילולי הקנאה אין העולם מתקיים. לפי שאין אדם נושא אשה ובונה בית שאלמלא הקנאה שקינא אברהם להקב"ה לא היה קונה שמים וארץ. ואימתי קינא. כשאמר למלכי צדק כיצד יצאתם מן התיבה. אמר לו בצדקה שהיינו עושים. אמר לו וכי מה צדקה היה לכם לעשות וכי עניים היו שם והלא לא היה אלא נח ובניו ועל מי הייתם עושים צדקה. אמר לו על החיה והבהמה והעוף. לא היינו ישנים כל הלילה אלא היינו נותנין לפני זה ולפני זה. פעם אחת איחרנו את עצמנו ויצא אבי משובר. אותה שעה אמר אברהם מה אלו אלולא שעשו צדקה עם בהמה חיה ועוף לא היו יוצאין משם ובשביל שאיחר עצמו כמעט קיבל שכרו ונשבר. אני אם אעשה עם בני אדם שהם בדמות וצלם של המלאכים על אחת כמה וכמה שאנצל מן הפגעים. מיד (בראשית כא לג) ויטע אש"ל. אכילה שתיה לויה. וכן שלמה אמר (קהלת ד ד) וראיתי את כל עמל ואת כל כשרון המעשה כי היא קנאת איש מרעהו. לכך אל יקנא לבך בחטאים: To David: Do not compete with evildoers. As it says in Proverbs 23:17, "Do not let your heart envy sinners, but always be zealous for the fear of the Lord." So why envy (them) in the fear of the Lord all day long? Do not envy the candle of the wicked, for you can see how much oil is in it, a quarter or an eighth, (yet) the entire oil (burns) and the candle goes out. And thus it says (in the same chapter, verse 18), "Surely there is a future hope for you, and your hope will not be cut off." And it says (verse 20), "The lamp of the wicked is snuffed out." This is its bright rule. Therefore, David says, "Do not compete with evildoers." Be zealous for a candle that never goes out, and whose candle does not go out. As it says (Proverbs 6:23), "For this command is a lamp, this teaching is a light, and correction and instruction are the way to life." Therefore, do not let your heart envy (them). The Lord said, "I am jealous because if there were no jealousy, the world would not exist. For if Abraham had not been jealous for the Lord, he would not have acquired heaven and earth." And when did he become jealous? When he said to the kings of righteousness, "How did you come out of the ark?" He said to him, "With righteousness that we did." He said to him, "What righteousness did you have to do, and were there poor people there? There was only Noah and his sons, so for whom did you do righteousness?" He said to him, "About the animals and the birds." We were not sleeping all night, but we were giving (food) to this one and to that one. Once we delayed ourselves and my father was injured. At that moment, Abraham said, "If these (people) had not done righteousness with animals, birds, and beasts, they would not have come out of there. And because he delayed himself, he almost received his reward and was injured. If I do (good) with human beings, who are in the image and likeness of angels, how much more will I benefit from the harm?" Immediately (Genesis 21:33), he planted a tamarisk tree. He ate, drank, and rejoiced. And Solomon said (Ecclesiastes 4:4), "And I saw that all toil and all achievement spring from one person's envy of another. This too is meaningless, a chasing after the wind." Therefore, do not let your heart envy (them) in sin....
כי כחציר מהרה ימלו. אמר הקב"ה אין הרשעים כלום חציר הם תוחלתם. וכן הוא אומר (תהלים צב ח) בפרוח רשעים כמו עשב. מפריחין כזה העשב ומתייבשין. וכן בלדד אומר (איוב ח טז) רטוב הוא לפני שמש ועל גנתו יונקתו תצא. ועד מתי לפני שמש עד שלא תבוא תקופת תמוז מתיבשין ואחר כך נעשין קוצין. ולהיכן הם הולכים באש. שנאמר (תהלים קיח יב) דועכו כאש קוצים. ולכך כירק דשא יבולון: "For like grass they will soon wither. The Lord said, 'The wicked are nothing but grass; their hope is in vain.' As it says, 'When the wicked flourish like grass and all evildoers thrive, it is only so that they may be destroyed forever' (Psalm 92:8-9). Similarly, in Job it says, 'He is like a plant that grows in the sun, spreading its roots over a garden; it may grow beautifully, but when the scorching winds blow, it withers away' (Job 8:16-19). How long will they be like this, before they are consumed by fire? As it says, 'They will be trampled down like thorns, burning like fire' (Psalm 118:12). And that is why they will be harvested like weeds."...
בטח בה' ועשה טוב. אמר לו הקב"ה לדוד אם תראה שאני עושה טובה לרשעים אל ירע לך כל כך תוסיף ועשה טוב. ואין טוב אלא תשובה שנאמר (הושע יד ג) כל תשא עון וקח טוב. ומה אם הרשעים שהן מכעיסין לפני ואין לי מהם תועלת עשיתי עמהם טובה. עמך שאתה בוטח בי ואתה עוסק בתורה ואתה עושה משפט וצדקה ומקרא מעיד עליך שנאמר (שמואל-ב ח טו) ויהי דוד עושה משפט וצדקה. על אחת כמה וכמה. לכך בטח בה' ועשה טוב. ולמה היה דוד דומה. לפועל שהיה עושה כל ימיו אצל המלך ולא נתן לו שכרו. והיה אותו הפועל מיצר ואומר שמא לא אוציא בידי כלום. אחר זמן שכר המלך פועל אחר ולא עשה עמו אלא יום אחד האכילהו והשקהו ונתן לו שכרו משלם. אמר אותו הפועל ומה זה שלא עשה אלא יום אחד כך. אני שעשיתי עמו כל ימי על אחת כמה וכמה. התחיל שמח בלבו. כך אמר דוד (תהלים ד ח) נתתה שמחה בלבי מעת דגנם ותירושם רבו. אימתי שמחה בלבי כשראיתי אותך מה עשית לרשעים. מעת דגנם ותירושם רבו. רבי אלעזר אומר מתוך שלותן של רשעים בעולם הזה תדע מהו מתן שכרם של צדיקים בעולם הבא. מה אם הרשעים כך הצדיקים על אחת כמה וכמה. הדא הוא דכתיב נתת שמחה בלבי. (תהלים לא כ) מה רב טובך אשר צפנת ליראיך: "Trust in the Lord and do good." God said to David, "If you see me doing good to the wicked, don't be so upset. Keep doing good and there is no good except for repentance, as it is said, 'Take words with you and return to the Lord' (Hosea 14:3). What if the wicked, who are provoking me and are of no use to me, I did good to them? With you, who trust in me, engage in Torah study, perform justice and charity, the verse testifies about you, as it says, 'David acted justly and righteously' (2 Samuel 8:15). How much more so in your case, trust in the Lord and do good. Why was David compared to a worker who worked all his days for the king and was not paid his wages? This worker was distressed and said, "Perhaps I will not get anything for my labor." After some time, the king hired another worker who worked with him for only one day, fed him and gave him his wages. The first worker said, "What is this? He worked only one day and got paid, whereas I worked with the king all my days and got nothing!" He began to rejoice in his heart. Similarly, David said, "You have put joy in my heart more than when their grain and new wine abound" (Psalms 4:8). When did joy come to my heart? When I saw what you did to the wicked, more than when their grain and new wine abounded. Rabbi Elazar says, "From the suffering of the wicked in this world, you can infer how great the reward of the righteous will be in the world to come." How much more so if the wicked are like this, the righteous are even more so. This is what is written, "How great is your goodness, which you have stored up for those who fear you" (Psalms 31:20).