When pain arises, the first strategy is to send your attention straight toward it, right to the center of it. You try to penetrate its core. Seeing pain as pain, note it persistently, trying to get under its surface so that you do not react.
Perhaps you try very hard, but you still become fatigued. Pain can exhaust the mind. If you cannot maintain a reasonable level of energy, mindfulness, and concentration, it is time to gracefully withdraw. The second strategy for dealing with pain is to play with it. You go into it and then you relax a bit. You keep your attention on the pain, but you loosen the intensity of mindfulness and concentration. This gives your mind a rest. Then you go in again as closely as you can; and if you are not successful you retreat again. You go in and out, back and forth, two or three times.
If the pain is still strong and you find your mind becoming tight and constricted despite these tactics, it is time for a graceful surrender. This does not mean shifting your physical position just yet. It means shifting the position of your mindfulness. Completely ignore the pain and put your mind on the rising and falling or whatever primary object you are using [for your meditation]. Try to concentrate so strongly on this that the pain is blocked out of your awareness.— Sayadaw U Pandita in In This Very Life