The Messenger of Allah (ﷺ) said: A judge should not decide between the two while he is in anger.
Sunan Abi Dawud Book 25, Hadith 19