It is also important to look at where the pain is localized. If this is a mental pain, then one needs to look at the beliefs/triggers/desires/attachments part of themself. If it is physical, then there is a spiritual reason behind the ailment. Look at where the pain is, figure out the spiritual lesson behind it, then once faced and dealt with, the pain just goes away forever.
So, yes, pain is a refiner of the self- and a darned good one.