Passage
Then David's anger was greatly kindled against the man; and he said to Nathan, As Jehovah liveth, the man that hath done this thing is worthy of death;
Then David's anger was greatly kindled against the man; and he said to Nathan, As Jehovah liveth, the man that hath done this thing is worthy of death;
2 Samuel 12:3 but the poor man had nothing at all, but one little ewe lamb which he had bought, and was nourishing; and it grew up with him, and together with his children: it ate of his morsel, and drank of his own cup, and slept in his bosom, and was to him as a daughter.
2 Samuel 12:4 And there came a traveller to the rich man, and he spared to take of his own flock and of his own herd, to dress for the wayfaring man that had come to him; and he took the poor man's lamb, and dressed it for the man that had come to him.
2 Samuel 12:5 Then David's anger was greatly kindled against the man; and he said to Nathan, As Jehovah liveth, the man that hath done this thing is worthy of death;
2 Samuel 12:6 and he shall restore the lamb fourfold, because he did this thing, and because he had no pity.
2 Samuel 12:7 And Nathan said to David, Thou art the man! Thus saith Jehovah the God of Israel: I anointed thee king over Israel, and I delivered thee out of the hand of Saul;
The verse centers on "david's", "anger", "greatly", "kindled", "against", "said", "nathan", and "jehovah". It is saying that the verse draws attention to "david's" and "anger", so its meaning should be read from those terms before moving to application.
The nearby context moves from verse 4's "And there came a traveller to the..." into verse 6's "and he shall restore the lamb fourfold...", so "david's" and "anger" belong inside that flow. In 2 Samuel context, the local focus is covenant, worship, and faithfulness.
A plain takeaway is to answer the verse's own emphasis on "david's" and "anger" with trust shaped by these words, not by a vague optimism outside the passage.