In II Samuel 16:5-8 the man Shimei made accusations against David that were hurtful, but groundless — and David’s gracious response should be instructive to us:
— notice the groundless cursing in :8. Shimei said: “YHWH has returned upon you all the bloodshed of the house of Saul, in whose place you have reigned”. Why was he accusing David with the blood of Saul? David had done NOTHING to touch Saul or his household. In face, he had gone out of his way NOT to harm Saul, when he could have killed him in the cave, etc. And he had actually gone “above and beyond” and elevated the one relative of Saul’s whom he could find, Jonathan’s son Mephibosheth, and gave him a place at the king’s table. David wasn’t guilty regarding Saul. Shimei’s accusation was groundless — yet hurtful. He viciously took the opportunity to “kick” David when he was down.
— But notice also the humble response of David:
He responded graciously (:11) “Let him alone and let him curse, for YHWH has told him.” He would not allow his men to go and “take him out” — which they wanted to do! At the heart of his gracious response was a trust in God: (:12) “Perhaps YHWH will look on my affliction and return good to me instead of his cursing this day.”
The fact is that God DID elevate David back to his place, as he trusted Him and responded rightly to the unjust accusations. We should follow David’s example and do the same. It is just as Psalm 37:1,3 admonishes: “Do not fret because of evildoers … Trust in the Lord and do good.” David didn’t merely write those words; in a real-life situation, he lived them out. May God give us the grace to do the same.