This is true not only of Tefillah, prayer, but also of all the other mitzwoth, especially Teshuvah.
Whenever you are learning Torah and are reminded of your less than spectacular actions, immediately stop what you are doing, stand up, and right then ask HaShem for foregiveness.
Then, of course, sit back down and continue on with your learning.
This is a great way to learn Torah and do Teshuvah all year round, and especially in Elul.
In this manner, you do Teshuvah in the heat of your embarrassment. Right when you are reminded of your flaws and are embarrassed by them, you turn to HaShem and do Teshuvah.
This is a high level of Teshuvah, rather than doing Teshuvah because you fear HaShem's punishment, you do Teshuvah because you are arroused by the Torah to be embarrassed by your deeds before HaShem.
There are higher levels of Teshuvah still, may we all merit to reach them in the days of Elul that remain and the 10 days of repentance that are quickly approaching.