كتاب الأقضية
30  
The Book of Judicial Decisions
(7)
Chapter: It is disliked for a judge to pass a judgement when he is angry
(7)
باب كَرَاهَةِ قَضَاءِ الْقَاضِي وَهُوَ غَضْبَانُ ‏‏
Sahih Muslim 1717 a

Abd al-Rahman b. Abu Bakra reported:

My father dictated (and I wrote for him) to Ubaidullah b. Abu Bakra while he was the judge of Sijistan: Do not judge between two persons when you are angry, for I have heard Allah's Messenger (ﷺ) as saying: None of you should judge between two persons when he is angry.
حَدَّثَنَا قُتَيْبَةُ بْنُ سَعِيدٍ، حَدَّثَنَا أَبُو عَوَانَةَ، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، عَنْ عَبْدِ الرَّحْمَنِ، بْنِ أَبِي بَكْرَةَ ‏.‏ قَالَ كَتَبَ أَبِي - وَكَتَبْتُ لَهُ - إِلَى عُبَيْدِ اللَّهِ بْنِ أَبِي بَكْرَةَ وَهُوَ قَاضٍ بِسِجِسْتَانَ أَنْ لاَ، تَحْكُمَ بَيْنَ اثْنَيْنِ وَأَنْتَ غَضْبَانُ فَإِنِّي سَمِعْتُ رَسُولَ اللَّهِ صلى الله عليه وسلم يَقُولُ ‏ "‏ لاَ يَحْكُمْ أَحَدٌ بَيْنَ اثْنَيْنِ وَهُوَ غَضْبَانُ ‏"‏ ‏.‏
Reference : Sahih Muslim 1717a
In-book reference : Book 30, Hadith 21
USC-MSA web (English) reference : Book 18, Hadith 4264
  (deprecated numbering scheme)