Zayd bin Khalid al-Juhani (may Allah be pleased with him) asked Sayyiduna Uthman bin Affan (may Allah be pleased with him): Tell me, if someone has intercourse with his wife and does not emit semen (that is, does not ejaculate), what should he do? Sayyiduna Uthman (may Allah be pleased with him) said: "He should perform ablution as he does for prayer and wash his private part." He mentioned that he heard this from the Messenger of Allah (peace and blessings be upon him). I then asked Ali bin Abi Talib, al-Zubayr bin al-Awwam and Talhah bin Ubaydullah (may Allah be pleased with them) about that, and they also instructed the same.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الطهارة / 772