The Bible seems to take a view of suffering that is very different from one commonly held by people in the world. To many people, pain means something is wrong. The Bible takes the view of someone training to run long distances.
Pain can mean something is wrong; there is an injury or a wrong technique is being used. But it can also come from doing the right thing, and being stretched.
We are encouraged to consider the situation when we are suffering. If we are doing wrong, we should repent. If we are doing right, we should persist. It is this persistence in doind right in the face of suffering that has a purifying effect. It strengthens our hearts.
And if our hearts are changed, then our beings are changed. We think differently. We have renewed perspectives about what is important, our final destiny, God and people. And the Bible say we should derive a positive expectation from life by this persistence in doing good, in the midst of suffering.