The Messenger of Allah said: “Whoever sits in a sitting and then says the following dua before getting from that sitting of his, whatever occurred in that sitting would be forgiven to him."
سُبْحَانَإكَ اللّهُمَّ وَبِحَمْدِكَ أَشْهَدُ أَنْ لَا إِلهَ إِلَّا أَنْتَ أَسْتَغْفِرُكَ وَأَتُوْبُ لَِيْكَ
Subuhanakallahumma wa bihamdhika ash-hadhu alla’ilaha illa antha as’thaghfiruka wa’athoobu
ilaik.
Meaning:
Glory is to You, O Allah, and praise, I bear witness that there is none worthy of worship except You, I seek You forgiveness, and I repent to You.
(Book: Tirmidhi 3355)
Or can recite following dua also,
سُبْحَانَكَ اللّهُمَّ وَبِحَمْدِكَ أَسْتَغْفِرُكَ وَأَتُوبُ إِلَيْكَ
Subuhanakallahumma wa bihamdhika as’thaghfiruka wa’athoobu ilaik.
Meaning:
O Allah and I begin with praise of You, I ask thy pardon, and return to You in repentance.
(Book: Nasa'i 1327)