It is narrated from Sayyiduna Jabir (may Allah be pleased with him) that the Prophet (peace and blessings be upon him) said: When any one of you sees a woman and she pleases him, he should go to his wife, for this will remove the thoughts that have arisen in his heart.
Hadith Referenceمسند احمد / مسند المكثرين من الصحابة / 14672
Hadith Gradingحکم دارالسلام:صحيح لغيره، م: 1403، وهذا إسناد ضعيف لسوء حفظ ابن لهيعة، وانظر: 14537