Amr bin As reported,

I had a wet dream on a cold night during the expedition of Dhat al-Salasil. I feared that if I bathed I would perish, so I performed tayammum and then led my companions in the dawn prayer. They mentioned this to the Prophet ﷺ, who said, "Amr, did you lead your companions in prayer while you were in a state of major impurity?"I told him what had prevented me from bathing and said, "I heard Allah say, 'And do not kill yourselves. Indeed, Allah is ever Merciful to you' [Nisa 4:29]."The Messenger of Allah ﷺ laughed and said nothing.

Abu Dawud 334

Sahih

حدثنا ابن المثنى أخبرنا وهب بن جرير أخبرنا أبي قال سمعت يحيى بن أيوب يحدث عن يزيد بن أبي حبيب عن عمران بن أبي أنس عن عبد الرحمن بن جبير المصري

عن عمرو بن العاص قال

احتلمت في ليلة باردة في غزوة ذات السلاسل فأشفقت إن اغتسلت أن أهلك فتيممت ثم صليت بأصحابي الصبح فذكروا ذلك للنبي ﷺ فقال يا عمرو صليت بأصحابك وأنت جنب فأخبرته بالذي منعني من الاغتسال وقلت إني سمعت الله يقول {ولا تقتلوا أنفسكم إن الله كان بكم رحيما} فضحك رسول الله ﷺ ولم يقل شيئا

أبو داود 334صحيح
Contents
Reference
Commentary
Ayat
Collection
Sunan Abu Dawud
Book
Purification
Chapter
If a person in a state of janabah fears the cold, may he perform tayammum
Numbering
Darussalam 334
Abu Dawud 334