Sayyiduna Samurah bin Jundub (may Allah be pleased with him) narrates: The Prophet (peace and blessings be upon him) used to say to us: "I become angry with you, and then I also hold you excused. Then I supplicate to Allah Almighty concerning the matter between Him and me: O Allah, whomever I have cursed, or spoken ill of, or shown anger towards, make that for them a means of blessing, mercy, forgiveness and grace, for they are my people and I am their well-wisher."
Al-Tabarani recorded it, and its chain contains narrators whom I do not know.