Language:
كتاب الحدود
86  
Limits and Punishments set by Allah (Hudood)
(42)
Chapter: What punishment may be inflicted on the person so that they may not commit the same sin again, or so that they may learn good manners
(42)
باب كَمِ التَّعْزِيرُ وَالأَدَبُ
Sahih al-Bukhari 6853

Narrated `Aisha:

Allah's Messenger (ﷺ) never took revenge for his own self in any matter presented to him till Allah's limits were exceeded, in which case he would take revenge for Allah's sake.

حَدَّثَنَا عَبْدَانُ، أَخْبَرَنَا عَبْدُ اللَّهِ، أَخْبَرَنَا يُونُسُ، عَنِ الزُّهْرِيِّ، أَخْبَرَنِي عُرْوَةُ، عَنْ عَائِشَةَ ـ رضى الله عنها ـ قَالَتْ مَا انْتَقَمَ رَسُولُ اللَّهِ صلى الله عليه وسلم لِنَفْسِهِ فِي شَىْءٍ يُؤْتَى إِلَيْهِ حَتَّى تُنْتَهَكَ مِنْ حُرُمَاتِ اللَّهِ فَيَنْتَقِمَ لِلَّهِ‏.‏
Reference : Sahih al-Bukhari 6853
In-book reference : Book 86, Hadith 75
USC-MSA web (English) reference : Vol. 8, Book 82, Hadith 836
  (deprecated numbering scheme)