Hadith 2800
Sayyiduna Abu Huraira (may Allah be pleased with him) said: The Messenger of Allah (peace and blessings be upon him) supplicated: "O Allah! I am a human being, so for any Muslim whom I curse, or speak badly to, or strike, make it for him a means of prayer, mercy, and nearness (to You) by which he attains Your closeness on the Day of Resurrection."
Hadith 2801
A narration similar to this is also reported from Sayyiduna Jabir (may Allah be pleased with him), but in it there is «زكاة و رحمة», that is, "Make my cursing and praising for them a means of purification and mercy."