It's like the suffering that purifies us here on earth. You don't resent it. It can make you bitter, or make you better. When you accept what the Father has sent or permitted to you, it makes you better.
Suffering is not incompatible with grace. Jesus suffered on the Cross for all of us, and thus paid the price for our salvation.. Was He not full of grace? All the time?
You have to die in the state of grace to even get to purgatory.