Caution: Translations of Quran and Ḥadīth may lead to possible misapplications and misinterpretations. This site is intended for students of sacred knowledge that are proficient in comprehending classical Arabic and have a strong foundation in Islamic sciences. Also note that religious injunctions rely on several aspects beyond what one may glean through reading individual aḥādīth.
bayhaqi:13379Abū ʿAbdullāh al-Ḥāfiẓ > Ismāʿīl b. Aḥmad > Muḥammad b. al-Ḥasan b. Qutaybah > Ḥarmalah > Ibn Wahb > Yūnus > Ibn Shihāb > Saʿīd b. al-Musayyib > Abū Hurayrah

[Machine] "He heard the Messenger of Allah ﷺ saying: 'O Allah, whoever I have caused harm to, make it a means of closeness to you for him on the Day of Judgment.'"  

البيهقي:١٣٣٧٩أَخْبَرَنَا أَبُو عَبْدِ اللهِ الْحَافِظُ ثنا إِسْمَاعِيلُ بْنُ أَحْمَدَ أنبأ مُحَمَّدُ بْنُ الْحَسَنِ بْنِ قُتَيْبَةَ ثنا حَرْمَلَةُ أنبأ ابْنُ وَهْبٍ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ حَدَّثَنِي سَعِيدُ بْنُ الْمُسَيِّبِ عَنْ أَبِي هُرَيْرَةَ

أَنَّهُ سَمِعَ رَسُولَ اللهِ ﷺ يَقُولُ اللهُمَّ فَأَيُّمَا عَبْدٍ مُؤْمِنٍ سَبَبْتُهُ فَاجْعَلْ ذَلِكَ لَهُ قُرْبَةً إِلَيْكَ يَوْمَ الْقِيَامَةِ  

رَوَاهُ الْبُخَارِيُّ فِي الصَّحِيحِ عَنْ أَحْمَدَ بْنِ صَالِحٍ عَنِ ابْنِ وَهْبٍ وَرَوَاهُ مُسْلِمٌ عَنْ حَرْمَلَةَ بْنِ يَحْيَى

See similar narrations below:

Collected by Bukhārī, Muslim
bukhari:6361Aḥmad b. Ṣāliḥ > Ibn Wahb > Yūnus > Ibn Shihāb > Saʿīd b. al-Musayyab > Abū Hurayrah

that he heard the Prophet ﷺ saying, "O Allah! If I should ever abuse a believer, please let that be a means of bringing him near to You on the Day of Resurrection."  

البخاري:٦٣٦١حَدَّثَنَا أَحْمَدُ بْنُ صَالِحٍ حَدَّثَنَا ابْنُ وَهْبٍ قَالَ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ قَالَ أَخْبَرَنِي سَعِيدُ بْنُ الْمُسَيَّبِ عَنْ أَبِي هُرَيْرَةَ ؓ

أَنَّهُ سَمِعَ النَّبِيَّ ﷺ يَقُولُ اللَّهُمَّ فَأَيُّمَا مُؤْمِنٍ سَبَبْتُهُ فَاجْعَلْ ذَلِكَ لَهُ قُرْبَةً إِلَيْكَ يَوْمَ الْقِيَامَةِ  

muslim:2601fḤarmalah b. Yaḥyá > Ibn Wahb > Yūnus > Ibn Shihāb > Saʿīd b. al-Musayyab > Abū Hurayrah

O Allah, for any believing servant whom I curse make that as a source of nearness to Thee on the Day of Resurrection.  

مسلم:٢٦٠١fحَدَّثَنِي حَرْمَلَةُ بْنُ يَحْيَى أَخْبَرَنَا ابْنُ وَهْبٍ أَخْبَرَنِي يُونُسُ عَنِ ابْنِ شِهَابٍ أَخْبَرَنِي سَعِيدُ بْنُ الْمُسَيَّبِ عَنْ أَبِي هُرَيْرَةَ

أَنَّهُ سَمِعَ رَسُولَ اللَّهِ ﷺ يَقُولُ اللَّهُمَّ فَأَيُّمَا عَبْدٍ مُؤْمِنٍ سَبَبْتُهُ فَاجْعَلْ ذَلِكَ لَهُ قُرْبَةً إِلَيْكَ يَوْمَ الْقِيَامَةِ