كتاب البر والصلة والآداب
45  
The Book of Virtue, Enjoining Good Manners, and Joining of the Ties of Kinship
(25)
Chapter: Whomever Is Cursed, Reviled Or Prayed Against By The Prophet (SAW) When He Does Not Deserve That, It Will Be Purification, Reward And Mercy For Him
(25)
باب مَنْ لَعَنَهُ النَّبِيُّ صلى الله عليه وسلم أَوْ سَبَّهُ أَوْ دَعَا عَلَيْهِ
Sahih Muslim 2602 b

This hadith has been transmitted on the authority of A'mash and in the hadith transmitted on the authority of 'Isa the words are:

Make it a source of reward, and in the hadith transmitted on the authority of Abu Huraira (the words are):" Make it a source of mercy."
حَدَّثَنَا أَبُو بَكْرِ بْنُ أَبِي شَيْبَةَ، وَأَبُو كُرَيْبٍ قَالاَ حَدَّثَنَا أَبُو مُعَاوِيَةَ، ح وَحَدَّثَنَا إِسْحَاقُ، بْنُ إِبْرَاهِيمَ أَخْبَرَنَا عِيسَى بْنُ يُونُسَ، كِلاَهُمَا عَنِ الأَعْمَشِ، بِإِسْنَادِ عَبْدِ اللَّهِ بْنِ نُمَيْرٍ ‏.‏ مِثْلَ حَدِيثِهِ غَيْرَ أَنَّ فِي، حَدِيثِ عِيسَى جَعَلَ ‏"‏ وَأَجْرًا ‏"‏ ‏.‏ فِي حَدِيثِ أَبِي هُرَيْرَةَ وَجَعَلَ ‏"‏ وَرَحْمَةً ‏"‏ ‏.‏ فِي حَدِيثِ جَابِرٍ ‏.‏
Reference : Sahih Muslim 2602b
In-book reference : Book 45, Hadith 116
USC-MSA web (English) reference : Book 32, Hadith 6289
  (deprecated numbering scheme)