Sayyidina Abdur Rahman ibn Abu Bakrah (SAW) narrated: My father wrote to Ubaydullah ibn Abu Bakrah who was a qadi, “Do not judge between two people while you are angry, for, I had heard Allah’s Messenger (SAW) say that a ruler must not judge between two people while he is in anger.”
[Bukhari 7158, Muslim 1717, Abu Dawud 3589, Nisai 5421, Ibn e Majah 2316, Ahmed 20401]