Abu Hurairah (RA) reported Allah's Messenger (ﷺ) as saying: He who seeks repentance (from the Lord) before the rising of the sun from the west (before the Day of Resurrection), Allah turns to him with Mercy.
Explanation & Benefits
Shaykh Maulana Abdul Aziz Alvi
Hadith Commentary: Benefits and Issues: Repentance (tawbah) is valid and accepted as long as there remains hope and expectation of life, and death has not yet come before one’s eyes. When the sun rises from the west, this is a sign that the world has come to an end. Similarly, when the state of gargara (death rattle) begins for a person, after that there remains no hope or expectation of life; this is the definite and final sign of death, so at such a time repentance is not accepted. Therefore, a servant should not procrastinate, but should hold fast to repentance (tawbah) and seeking forgiveness (istighfar), for one does not know at what moment the hour of death may arrive.
Source: Tuhfat al-Muslim: Commentary on Sahih Muslim, Page: 6861