The Messenger of Allah ﷺ said, "O Allah, I take a covenant with You that You will never break with me. I am only a human being. So any believer whom I have hurt, or insulted, or lashed, or cursed, make that for him a prayer, a purification, and a means of nearness by which You bring him close on the Day of Resurrection."
وقال رسول الله ﷺ اللهم إني أتخذ عندك عهدا لن تخلفنيه إنما أنا بشر فأي المؤمنين آذيته أو شتمته أو جلدته أو لعنته فاجعلها له صلاة وزكاة وقربة تقربه بها يوم القيامة
This is sahih like the previous hadiths, and it is in the Sahifah Mufradah under number 86. The two Shaykhs did not narrate it through the route of the Sahifah. Muslim narrated it in 2:287 (Bulaq edition) with chains of transmission through various routes from Abu Hurairah, and the closest of them to this narration is his narration through the copy of Araj from Abu Hurairah. Bukhari narrated in 11:147 (Fath) something similar in meaning, in summarized form, through the narration of Saeed bin Musayab from Abu Hurairah. Its meaning has already passed in summarized form at 7309, through the narration of Araj from Abu Hurairah. Its meaning will also come at 9058 and 9059, through the narration of Abu Salih from Abu Hurairah.