ENOfficial
'Abd al-Rahman bin Abi Bakrah reported on the authority of his father that he wrote to his son: The Messenger of Allah (ﷺ) said: A judge should not decide between the two while he is in anger.
Source: sunnah.com
Other translations
Arabic
حَدَّثَنَا مُحَمَّدُ بْنُ كَثِيرٍ، أَخْبَرَنَا سُفْيَانُ، عَنْ عَبْدِ الْمَلِكِ بْنِ عُمَيْرٍ، حَدَّثَنَا عَبْدُ الرَّحْمَنِ بْنُ أَبِي بَكْرَةَ، عَنْ أَبِيهِ، أَنَّهُ كَتَبَ إِلَى ابْنِهِ قَالَ قَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم " لاَ يَقْضِي الْحَكَمُ بَيْنَ اثْنَيْنِ وَهُوَ غَضْبَانُ " .
sunnah.com