It is narrated from Sayyidah Umm Salamah (may Allah be pleased with her) that the Prophet (peace and blessings be upon him) said: "Whoever is tried with judging between the Muslims, let him not judge while he is angry."
Hadith Referenceالمعجم الكبير للطبراني / مسند النساء / 19924