2 Corinthians 7:8:10 (NLT)
8 I am not sorry that I sent that severe letter to you, though I was sorry at first, for I know it was painful to you for a little while. 9 Now I am glad I sent it, not because it hurt you, but because the pain caused you to repent and change your ways. It was the kind of sorrow God wants his people to have, so you were not harmed by us in any way. 10 For the kind of sorrow God wants us to experience leads us away from sin and results in salvation. There�s no regret for that kind of sorrow. But worldly sorrow, which lacks repentance, results in spiritual death.

The Apostle Paul writes to the Corinthian Church about a previous letter he had sent. In the letter he had spelled out changes they needed to make within the church and in the lives of the people. Paul knew saying those things would cause regret and sorrow. However, in the long term it would lead to a sorrow God wants us to experience to lead us away from those sins which would harm us.

There are two ways to deal with regret and sorrow. The first is to allow the regret and sorrow take hold of your life; dominating your thoughts and leading towards more self destructive behavior. Take for instance a person on a diet. There are some who if they cheat once will begin to regret their failure. The sorrow turns into an excuse to binge and they fall away from the diet. The second is to allow the regret and sorrow to be a reminder of what not to do knowing God wants to teach us a lesson. In the same example a person cheats on their diet, but this time instead of binging they see their mistake and take actions to correct the problem. They face what they did head on and they allow the sorrow to lead them away from problems instead of being drawn to them. In the same way God wants our sorrow to lead us from sin and back towards Him.