Hadithcore
Mishkat al-Masabih, 3731

Abu Bakra told that he heard God’s Messenger say, “No judge must give judgment between two people when he is angry.” (Bukhari and Muslim.)

عَنْ أَبِي بَكْرَةَ قَالَ سَمِعْتُ رَسُولَ اللَّهِ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَقُولُ: «لَا يَقْضِيَنَّ حَكَمٌ بَيْنَ اثْنَيْنِ وَهُوَ غَضْبَانُ»

References1 variant
In-Book Reference
Book 18, Hadith 70