Jabir bin Abdullah reported,

The Messenger of Allah ﷺ saw a woman, so he went to his wife Zaynab while she was tanning a hide and fulfilled his need with her. Then he went out to his companions and said, "A woman approaches in the form of a devil and turns away in the form of a devil. So if one of you sees a woman, let him go to his wife, for that will repel what is in his heart."

Muslim 3407

Sahih

حدثنا عمرو بن علي حدثنا عبد الأعلى حدثنا هشام بن أبي عبد الله عن أبي الزبير

عن جابر

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

مسلم 3407صحيح
Contents
Reference
Commentary
Ayat
Collection
Sahih Muslim
Book
Marriage
Chapter
It is recommended for one who sees a woman and feels desire to go to his wife or slave girl and have intercourse with her
Numbering
Darussalam 3407
Muslim 3407