Years ago, when I worked for a Caterpillar dealer, I got the opportunity to visit several Cat factories. One was a foundry where they produced metal parts of all kinds from large engine blocks to the smaller parts that keep an engine running. We were told that different metals purify at different temperatures and we got to see some of the process. During the heating, we saw the dross curling up to the surface where it was separated from the red-orange highly heated metal. This process is important if the final piece is going to have the quality it needs.
The same is somewhat true for us. God purifies us with fiery trials of differing temperatures all intended to release the corruption from within and make us stronger, higher quality disciples. But the process isn't easy. It hurts and sometimes the "growing pains" of these strengthening trials is very palpable.
You can probably think of several incidents in your life that, while troublesome and hurtful, ended up making you a better, more mature Christian. It's good to recognize the pain, but it's better to know that, by it, God is helping release the dross that hampers your character. Stick with it and someday you'll celebrate the result.
"The refining pot is for silver and the furnace for gold, but the Lord tests the hearts" (Prov. 17:3).