2Sa 16:11-12, 11 And David said to Abishai and all his servants, “See how my son who came from my own body seeks my life. How much more now may this Benjamite? Let him alone, and let him curse; for so the LORD has ordered him. 12 It may be that the LORD will look on my affliction, and that the LORD will repay me with good for his cursing this day.”
It is one thing to be afflicted by a stranger or an outsider, it stings more when it’s your own flesh and blood. David could tolerate Shimei’s actions and command Abishai to spare his life. It was David saying “let him alone, and let him curse; do nothing to restrain him, not even by words, and much less by any violent actions, and still less by taking away his life”
God governs by providence, He cause all things to work together for good (Rom 8:28). Vengeance is of the Lord, He will repay (Deu 32:35, Rom 12:19, 10:30). And David understanding the dealings of God from his experience with Saul, he could be trust God to deliver him even from the attacks of the enemy.
When men curse us, whether we deserve it or not, let us look past them to the permissive will of God and trust God for deliverance, Psa 25:1-3, “1 A Psalm of David. To You, O LORD, I lift up my soul. 2 O my God, I trust in You; Let me not be ashamed; Let not my enemies triumph over me. 3 Indeed, let no one who waits on You be ashamed; Let those be ashamed who deal treacherously without cause.”