Sahih al-Bukhari 7158
Narrated `Abdur Rahman bin Abi Bakra:
Abu Bakra wrote to his son who was in Sijistan: 'Do not judge between two persons when you are 
angry, for I heard the Prophet (ﷺ) saying, "A judge should not judge between two persons while he is in 
an angry mood."
حَدَّثَنَا آدَمُ، حَدَّثَنَا شُعْبَةُ، حَدَّثَنَا عَبْدُ الْمَلِكِ بْنُ عُمَيْرٍ، سَمِعْتُ عَبْدَ الرَّحْمَنِ بْنَ أَبِي بَكْرَةَ، قَالَ كَتَبَ أَبُو بَكْرَةَ إِلَى ابْنِهِ وَكَانَ بِسِجِسْتَانَ بِأَنْ لاَ تَقْضِيَ بَيْنَ اثْنَيْنِ وَأَنْتَ غَضْبَانُ، فَإِنِّي سَمِعْتُ النَّبِيَّ صلى الله عليه وسلم يَقُولُ ‏
"‏ لاَ يَقْضِيَنَّ حَكَمٌ بَيْنَ اثْنَيْنِ وَهْوَ غَضْبَانُ ‏"‏‏.‏