"My father wrote to 'Ubaidullah bin Abi Bakrah - who was the judge of Sijistan - saying: 'Do not pass judgment between two people when you are angry, for I heard the Messenger of Allah say: No one should pass judgment between two people when he is angry.'"
Sunan an-Nasa'i Book 49, Hadith 28