Sayyidah Aishah Siddiqah (may Allah be pleased with her) narrates that the Prophet (peace and blessings be upon him) said: "When Allah Almighty intends good for a servant, He washes him." It was asked: "O Messenger of Allah, how does He wash him?" The Prophet (peace and blessings be upon him) said: "He grants him the ability to do a righteous deed before his death and then takes his soul in that state."
Al-Tabarani recorded it in al-Mu'jam al-Awsat, and its narrators are the narrators of the Sahih, except Yunus bin Uthman, who is thiqah (trustworthy).
Hadith Referenceمجمع الزوائد ومنبع الفوائد / كتاب القدر / 11933