Midrash Tehillim 62, a beautiful exploration from the world of midrash (Jewish biblical interpretation), gives us some fascinating – and maybe even comforting – food for thought.
The midrash starts with the phrase, "Like his deeds," suggesting that God repays us in kind. But what does that really mean? The text explains it in a surprising way: when someone sins and deserves death, God…waits. The midrash says He waits until the person marries and has children, and then takes one of the children as atonement. It’s a harsh image, no doubt, but the midrash frames it as God "collecting from his own."
But then, it gets even more interesting. Rabbi Nehemiah offers another perspective on "like his deeds." He says that if someone thinks about sinning but doesn't actually do it, God doesn't hold it against them. But – and this is key – if they intend to do a good deed but are prevented, God credits them as if they had done it! It's a radical idea: that intention, even unrealized, counts for something in the divine ledger.
And where do we see this idea in action? The midrash points to David, the king of Israel, and his burning desire to build the Temple. Remember how David felt? Psalm 132 reminds us of his oath, his longing to create a dwelling place for God. 1 Chronicles elaborates on this, mentioning how he prepared for the house of God.
As we find in 2 Samuel, David, settled in his cedar palace, felt the stark contrast with the Ark dwelling in a simple tent. He tells Nathan the prophet his thoughts, but God then tells Nathan to tell David that he is not meant to build the Temple.
So why couldn't David build the Temple? The answer is layered and a bit complex. As 2 Samuel and 1 Chronicles both tell us through Nathan's prophecy, God tells David it won’t be him. The midrash resolves the apparent contradiction between these verses, explaining that while David wouldn't physically build the Temple, it would be called by his name, as we see in Psalm 30: "A Psalm and Song at the dedication of the house of David."
Rabbi Yehuda bar Elai adds another layer. He recounts God telling David not to fear, that his bloodshed in battle was "like that of a deer or a gazelle," meaning it was necessary and permitted. But God explains that the Israelites were destined to sin, and God would vent His anger on the Temple, saving Israel. If David built it, it would last forever, and that wouldn't be possible. In Lamentations we see this anger described.
Even though David couldn't build it, his intention, his desire to honor God, was so powerful that the Temple was still associated with him.
The midrash concludes by emphasizing that whoever intends to perform a mitzvah (a commandment or good deed) but is prevented from doing so, is credited as if they had performed it.
What does all this mean for us? It suggests a God who values intention, who understands the complexities of human life. It reminds us that even when our plans are thwarted, when we can't achieve what we set out to do, the desire, the aspiration, the pure intention itself is recognized and rewarded. It’s a comforting thought, isn't it? That our efforts, even incomplete ones, are seen and valued.
'Like his deeds' means just like his deeds. And what is 'below'? He collects from what is his own. What does the Holy One, blessed be He, do when a person is involved in a sin and deserving of death? He waits until he marries and has children, and then He takes one of his sons in place of that sin that he committed. In this way, the Holy One, blessed be He, collects from his own. There is an even greater kindness than this: 'To you, O Lord, belongs kindness.' Rabbi Nehemiah says: What is 'like his deeds'? There is a person who thinks to commit a sin, but does not do it, and the Holy One, blessed be He, does not record it until he actually commits it. However, if he thinks to do a good deed and is forced not to do it, the Holy One, blessed be He, records it as if he had done it. And you have learned from David, who was pained that he could not build the Temple, as it is said: 'Remember, O Lord, for David's sake, all the hardships he endured; how he swore an oath to the Lord' (Psalm 132:1-2). 'If only I could come to dwell in the tent of the Lord!' (1 Chronicles 22:14) And yet, with all his troubles, he prepared for the house of his God." And so it says (2 Samuel 7:1) "And it came to pass, when the king sat in his house, and the Lord had given him rest round about," he began to ponder in his heart and said (2 Samuel 7:2), "See now, I dwell in a house of cedar, but the ark of God dwelleth within curtains." Nathan the prophet said to him, "Did it not come up into the heart of the Lord to seek a man after His own heart?" (1 Samuel 13:14). It did not come up in your heart. Immediately, God revealed to him through Nathan, as it is written (2 Samuel 7:4-5), "And it came to pass that night, that the word of the Lord came unto Nathan, saying, Go and tell my servant David, Thus saith the Lord, Shalt thou build me an house for me to dwell in?" And it is written in another place (1 Chronicles 17:4), "Thou shalt not build me an house to dwell in." How can these two verses be reconciled? "Thou shalt not build me an house" means that it is not you who will build a house for Me, but your son Solomon will build it. "Shalt thou build me an house for me to dwell in?" means that the house will be called by your name, as it is written (Psalm 30:1), "A Psalm and Song at the dedication of the house of David." "And because you have shed much blood, I cannot allow you to build it, but only in the name of the Lord, since you have suffered. When David heard this, he became afraid and said, 'I have been disqualified from building the Temple.' Rabbi Yehuda bar Elai said to him, 'The Holy One, blessed be He, said to him, "Do not be afraid. Your bloodshed is like that of a deer or a gazelle before Me, as it is written of them (Deuteronomy 12:24), 'You shall pour it on the ground like water.' " David said to Him, "If so, why can't I build it?" He replied to him, "It is known and revealed before Me that the Israelites are destined to sin, and I vent My anger on it, and Israel will be saved. And if you build it, it will be established forever and will never be destroyed." David said to Him, "But isn't it beautiful?" He replied, "It is better that I vent My anger and destroy it, and they will be saved." This is what is written (Lamentations 2:4), "He has aimed His bow like an enemy." David said to Him, "And even though You are not building it, since You have considered it to be built in Your name, I will call it by Your name," as it is written (Psalm 30:1), "A psalm; a song for the dedication of the house. Of David." It does not say, "Of Solomon," but "Of David," to teach you that whoever intends to perform a commandment but is prevented from doing so, the Holy One, blessed be He, credits him as if he had performed it."