everytime you have a valid confession you are in a state of grace. mortal sin is actually pretty hard to do.
You enter the state of grace when you are baptized, and leave it only when you mortally sin (with grave matter, full knowledge, and deliberate consent).
You are able to re-enter it through:
valid confession with contrition or attrition (repentance because of love of God or fear of hell) or
an act of perfect contrition (which includes a desire to confess at the next available opportunity) which is repentance for the sake of love of God
either of those put you back into the state of Grace which you can only be removed from again by another mortal sin (with full grave matter, knowledge, and consent).
it's not that hard most people will just fall from it for sexual sin other than that mortal sins aren't actually that easy to come by.
The reason why frequent acts of contrition are advocated is because if you are in the habit of it makes the possibility of perfect contrition more probable. You can see both attrition and contrition in the traditional prayer:
O my God, I am heartily sorry for having offended Thee, and I detest all my sins because of thy just punishments, but most of all because they offend Thee, my God, who art all good and deserving of all my love. I firmly resolve with the help of Thy grace to sin no more and to avoid the near occasion of sin. Amen.
(fear and perfect love, fear is sufficient for forgiveness in confession but love is sufficient whenever)
and as I said when you are in a state of grace only mortal sin gets you out of it. very easy to enter into so long as you go to confession.
what you are talking about is the temporal punishment of sin, which is separate from the state of grace. Most people in the state of grace have that temporal punishment still and that's what indulgences are for.
Purgatory cleanses that temporal punishment of sin, and what indulgences reduce.