Pain is inevitable, suffering is optional. You have heard that before, right? Pain is nothing but an intense sensation. Yet, do not justify or encourage pain. Some people start justifying and encouraging pain, and that is where masochism starts. You need to stay clear of masochism, and that is why I would say if pain comes, it has come due to some karma, that's it, move on.
The principle of karma is such a healthy thing to save the mind. It's such a good vaccination for the mind. When you say karma, then you are able to let go and move on, otherwise you brood over whatever has happened in the past,and you try to link things with some cause.
If you look back, whatever you thought as cause is also an effect, it is not the cause. Every time you fix something as the cause of an effect, you have erred. You have seen that it is not true; it has not stood the test of time. No cause has stood the test of time because every cause is an effect. This is the spiritual way. When you think in this direction and go deeper to the ultimate cause, you find that there is only one thing that is the cause of the entire existence. With this one realization, your peace can never be taken away by anybody or any incident on the planet; nothing can move you if you know the cause!
That is why there is a beautiful verse in Sanskrit,"Tasmai nama parama karana karanaya", Shiva, you are the cause of all causes, the grand time that is beyond time, otherwise we keep going round in this cycle of karma.
Yes, it can be little confusing if you don't pay very keen attention to what I am saying. One is karma, i.e., cause and effect. Another is going beyond karma; how do you get out of the cycle of karma? Are you getting this? You have to ponder on this once more. This principle of karma is a big blessing for you to let go and move further.