למנצח מזמור לדוד. בבא אליו נתן הנביא. זה שאמר הכתוב (משלי יח כא) מות וחיים ביד לשון. לשונו של אדם מביאתו לחיי העולם הבא. ומי גרם לדוד שבא לחיי העולם הבא פיו שאמר חטאתי. שנאמר (שמואל-ב יב יג) ויאמר דוד אל נתן הנביא חטאתי. בחשיכה היה והאיר לו הקב"ה שנאמר (תהלים יח כט) כי אתה תאיר נרי ואומר (ישעיה נח י) וזרח בחשך אורך. אמר דוד לפני הקב"ה בבקשה ממך הסתכל בישרן של ישראל. וכן הקב"ה אומר לשלמה (מלכים-א ג יד) ואתה אם תלך בדרכי וגו' כאשר הלך דוד אביך. אמר דוד רבונו של עולם אל תסתכל באותה שעה שנכשלתי לפניך. וכן הוא אומר הסתר פניך מחטאי. כיון שאמר לו נתן הנביא (שמואל-ב יב יג) גם ה' העביר חטאתך. על כן אמר מזמור. הוי למנצח מזמור לדוד בבוא אליו נתן הנביא: To the conductor, a Psalm of David, which was given to him by the prophet Nathan. This is what the scripture says (Proverbs 18:21): "Death and life are in the power of the tongue." A person's tongue leads him to the afterlife. What caused David to enter the World to Come? It was his mouth, which said "I have sinned," as it is written (2 Samuel 12:13): "And David said to Nathan, 'I have sinned.'" He was in darkness, but God illuminated him, as it is written (Psalm 18:29): "For You will light my candle; the Lord my God will enlighten my darkness." And it is said (Isaiah 58:10): "And your darkness shall be like noonday." David said before God, "I ask of You to look at the beauty of Israel." And so God said to Solomon (1 Kings 3:14), "And if you will walk in My ways, as your father David walked." David said, "Master of the Universe, do not look at the time I sinned before You." And it is said (Psalm 51:11), "Hide Your face from my sins." Once Nathan the prophet said to him (2 Samuel 12:13), "The Lord has also put away your sin." Therefore, this Psalm was composed: "To the conductor, a Psalm of David, which was given to him by the prophet Nathan."
חנני ה' כחסדך. למה היה דוד דומה. למי שהיה לו מכה בידו ובא אצל הרופא. ואמר לו יכול אתה לרפאני. אמר לו הן אבל הדמים מועטים. אמר לו בבקשה ממך קח כל מה שבידי והשאר עשה משלך ועשה עמי חסד ורחם עלי. וכן דוד אומר להקב"ה חנני אלקים כחסדך. רחמן אתה וכרוב רחמיך מחה פשעי. הרבה חסד עשית עמי ועשה גם עתה ומחה פשעי. וכן הוא אומר (תהלים יז ז) הפלא חסדיך מושיע חוסים. ממך הרפואה ולפי שהמכה גדולה תן איספלנית גדולה. וכן הוא אומר הרב כבסני מעוני. מכאן את למד שכל מי שעובר עבירה כאילו נטמא בנפש מת ואין מטהרין אותו אלא באזוב וכן הוא אומר תחטאני באזוב ואטהר. וכי נטמא דוד בעוון נפש חלל אלא בעוון שהנפש חללה וכן הוא אומר (שם קט כב) לבי חלל בקרבי. מכאן את למד שכל מי שיודע שחטא ומתפלל על החטא ומתיירא ממנו ונושא ונותן בינו ובין המקום שהקב"ה מוחל לו. וכל מי שהוא יודע שחטא ושואף ברגלו ומעבירה מנגד עיניו הקב"ה מבקשה ממנו. וכן הוא אומר (שם מט ו) למה אירא בימי רע עון עקבי יסובני. אותן שדועכים את העוון ברגליהם בעקביהם. וכן משל הדיוט אומר עקרב רמת לגמלא ושואפה בעקיבה. אמר לו חייך עד קדקדך הוא מטילך. כך כל המעביר עוונו מנגד עיניו אין הקב"ה מוחל לו לכך אמר דוד וחטאתי נגדי תמיד: "Grant me, O Lord, according to Your kindness; just as David was likened to someone who had a wound in his hand and went to a doctor, asking him to heal him. The doctor replied that he could, but that the man's payment was too small. The man pleaded with the doctor, saying, 'Please take everything that I have and do the rest from your own [account], and show me kindness and mercy.' Similarly, David said to God, 'Grant me, O God, according to Your kindness; You are compassionate, and with Your great mercy, erase my transgressions. You have done much kindness with me, and do so now, and erase my transgressions.' As it says in Psalms 17:7, 'Wonderfully show Your kindness, O Savior of those who seek refuge.' From You comes healing, and since the wound is great, give a great plaster. And he also says, 'Cleanse me from my sin.' From here we learn that anyone who commits a sin is considered defiled in his soul, and he can only be purified with hyssop. And as it says, 'Purify me with hyssop, and I shall be clean.(Psalm 51:9)' Did David become impure with a grave sin? No, only with a sin that defiled his soul, as it says, 'My heart is defiled within me.' From here we learn that anyone who knows that he has sinned and prays for forgiveness, fears and shuns the sin, and discusses it with God, He forgives him. But anyone who knows that he has sinned and deliberately repeats it, the Lord demands from him. As it says, 'Why should I fear in times of trouble, when the iniquity of my heels surrounds me?' (Psalm 49:6) Those who trample on sin with their feet, with their heels, the scorpion strikes them. He said to him, 'Your life is at stake.' So too, anyone who repeats his sin before God, He does not forgive him. Therefore, David said, 'My sin is ever before me.'"
לך לבדך חטאתי למען תצדק בדברך. למה היה דוד דומה. למי שנשבר ובא לו אצל הרופא. והיה הרופא מתמה ואומר לו מה גדולה מכתך צר לי עליך מאד. אמר לו אותו שנשבר אתה צר לך עלי לא בשבילי נשברתי אלא בשביל השכר שלך. כך אמר להקב"ה לך לבדך חטאתי. כשאתה אומר לפושעים למה לא עשיתם תשובה. אם תקבלני כל הפושעים משלימים לך ומסתכלין בי ואני העד ומעיד לכל באי העולם שאתה מקבל השבים. וכן הקדוש ברוך הוא אומר לו (ישעיה נה ד) עד לאומים נתתיו. ולא אני בלבד אלא כל ישראל. וכן הוא אומר (שם מג י) אתם עדי נאם ה' ועבדי אשר בחרתי: "I have sinned against you alone, and done what is evil in your sight, so that you may be justified in your words and blameless in your judgment. Why was David similar to this? To one who is broken and comes to the doctor, and the doctor is amazed and says to him, 'How great is your wound, I am so sorry for you.' The one who is broken replies, 'You are only sorry for me, not for yourself. I did not break for my own sake, but for your reward.' So too, the Holy One, blessed be He, said to Himself, 'I have sinned against You alone.' When you say to sinners, 'Why didn't you repent?' if you accept me, all sinners will complete their repentance and look to me. And I will be a witness and testify to the entire world that you accept those who repent. And so He says to him (Isaiah 55:4), 'I made him a witness to the peoples.' Not just me, but all of Israel. And He also says (Isaiah 43:10), 'You are my witnesses, declares the Lord, and my servant whom I have chosen.'"