Abd al-Rahman bin Abi Bakrah (may Allah have mercy on him) said: Abu Bakrah (may Allah be pleased with him) wrote to his son while he was in Sijistan: Do not judge between two people while you are angry, for I heard the Prophet (peace and blessings be upon him) saying: "No judgement should be passed between two people in a state of anger."
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20275