2 Corinthians 7:9-10

7:9 Now I rejoice, not because you were made sad, but because you were made sad to the point of repentance. For you were made sad as God intended, so that you were not harmed in any way by us. 7:10 For sadness as intended by God produces a repentance that leads to salvation, leaving no regret, but worldly sadness brings about death.