Hadithcore
Mishkat al-Masabih, 446

She also said that the Prophet (ﷺ) used to wash his head with marshmallow when sexually defiled, contenting himself with that and not pouring water over it. Abu Dawud transmitted it.

وَعَنْ عَائِشَةَ قَالَتْ: كَانَ النَّبِيُّ صَلَّى اللَّهُ عَلَيْهِ وَسَلَّمَ يَغْسِلُ رَأْسَهُ بِالْخِطْمِيِّ وَهُوَ جُنُبٌ يَجْتَزِئُ بِذَلِكَ وَلَا يَصُبُّ عَلَيْهِ الْمَاءَ. رَوَاهُ أَبُو دَاوُد

References1 variant
In-Book Reference
Book 3, Hadith 150