“Allah does not judge you on how bad you have been in the past, but rather on how good you strive to be now”-Yasir Qadhi
The sin you committed a minute ago is history. It is done. There is no point dwelling on ‘what if’, this only opens the door for shaitan. If you whispered astaghfirullah after you committed it and swore to never return to it then you have been favoured above most of humanity. Look at Ad and Thamud, Pompei, Pharaoh. They were taken before their mouths could sincerely speak what you have just spoken.
If you are still alive to repent, then Allah has given you a lifeline and a magnificent victory that only dead wrongdoers see. They would give anything to be in your place. Read Surah al Fath and reflect on the victory that has just occurred. Don’t let shaitan tempt you into a downward spiral of numbing unproductive shame.
Celebrate you life, turn around immediately when you mess up and instead do good. Rinse and repeat.