Therefore, my brother, [based upon what has been taught above], be exceedingly careful to refrain from taking revenge and bearing a grudge against your fellow, [for by doing so against your fellow], you are [truly] taking revenge and bearing a grudge against yourself. [To avoid taking revenge and bearing a grudge against your fellow], simply think to yourself that all of this that has occurred was Heaven-sent, due to your sins, and what [difference is there] to me if this suffering came about through this [person] or through someone else? If I truthfully accept all of this [suffering] upon myself, my sins will thereby be pardoned.
This follows that which [we learn about King] David, [when he] responded to Avishai ben Tziruyah, at the time that [Avishai] wanted to take retribution against Shimi ben Geira on behalf of [David, as Shimi was going about] shaming and insulting David, as well as cursing him [with] a [powerful] curse. [However], David did not allow [Avishai to harm Shimi], and he [rather] said, “HaShem said to him, “Curse”… ”” (Shmuel II: 16; 10) Our Sages of Blessed Memory have [also] said [in this context], that the Heavenly Court [at that time], voted and appointed David that he would be the fourth of the legs of [HaShem’s] Chariot, as we shall [discuss] this at length later on, G-d Willing.
 The entire verse reads, “And the King said, what [differences] are there between me and you, the son of Tziruyah, for he is cursing, for HaShem said to him, “Curse David”, and who will say to [Shimi], “Why are you doing this?”” (Shmuel II: 16; 10)
RaSh”I explains that David said that as someone as great as the head of the Sanhedrin, Shimi, would not be cursing David, unless commanded to do so by HaShem.