I don't believe that we can stop pain from being there, but we CAN control our reaction to it. Pain is only bad if we label it as such. Pain is good if we label it as such.
I do several things when pain comes.
First, I accept it. Rather than the questions like "why me?" or statements like, "make it stop." Then I make friends with it. And then I try to determine the source. Is the pain actually in my body part or is it in my mind?