It is narrated from Hazrat Abu Bakrah (may Allah be pleased with him) that I heard the Prophet (peace and blessings of Allah be upon him) saying: No ruler should decide between two men while he is angry.
Hadith Referenceمسند احمد / أول مسند البصريين / 20522