The Prophet ﷺ said, "I am only a human being. I get angry just as people get angry. So for any man I have harmed or lashed, make it a means of purification and a blessing for him."
حدثنا سفيان عن أبي الزناد عن الأعرج
عن النبي ﷺ إنما أنا بشر أغضب كما يغضب البشر فأيما رجل آذيته أو جلدته فاجعلها له زكاة وصلاة
Its isnad is sahih. Muslim 2:287 also related it from Ibn Abu Umar from Sufyan, with this same isnad. However, he did not give its wording in full, but instead referred to the narration before it, which is longer than this one, transmitted through Mughira Hizami from Abu Zinad. Bukhari 11:147 related part of its meaning in brief form, from the hadith of Zuhri from Ibn Musayab from Abu Hurairah. See also what follows at 8184.