It is narrated from Hazrat Abu Huraira (may Allah be pleased with him) that he heard the Noble Prophet (peace and blessings be upon him) saying: O Allah, I am also a human being; just as other people get angry, I also get angry. (O Allah) If I have caused harm to anyone (unknowingly) or struck someone with a whip, then make it a means of atonement and closeness for that person on the Day of Resurrection.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 10403