Abu Dawud Book 1, Hadith Number 334.

Chapter : A person who is sexually defiled is permitted to eat anything before washing.

Narated By Amr ibn al-‘As : I had a sexual dream on a cold night in the battle of Dhat as-Salasil. I was afraid, if I washed I would die. I, therefore, performed tayammum and led my companions in the dawn prayer. They mentioned that to the Apostle of Allah (PBUH). He said: Amr, you led your companions is prayer while you were sexually defiled? I informed him of the cause which impeded me from washing. And I said: I heard Allah say: “Do not kill yourself, verily Allah is merciful to you.” The Apostle of Allah (PBUH) laughed and did not say anything.

Abu Dawud said: ‘Abd al-Rahman b. Jubair is an Egyptian and a freed slave of Kharijah b. Hudhafah. He is not Jubair b. Nufair.