For pain that is from God produces a repentance that leads to salvation and leaves no regret; the pain of the world produces death.
In context
8Even if I caused you pain by my letter, I do not regret it — though I did regret it, for I see that the letter caused you pain, if only for a while — 9but now I rejoice, not because you were pained but because your pain led you to repentance. You were pained in a way that is from God, so you suffered no loss at our hands. 10For pain that is from God produces a repentance that leads to salvation and leaves no regret; the pain of the world produces death. 11Look at what this very pain, the pain from God, has produced in you: what earnestness, what defense of yourselves, what indignation, what fear, what longing, what zeal, what readiness to see justice done! At every point you have shown yourselves innocent in this matter. 12So although I wrote to you, it was not because of the one who did the wrong, nor because of the one who was wronged, but so that your own earnestness for us might be made plain to you before God.