Lama Ole’s answer:
A vast topic! The best might be a general Buddhist method and, I’m sorry, it sounds very simple: detachment. That means to always understand that we have our body rather than that we are our body.
Pain is always related to the belief in the reality of experiences that appear in one’s mind. If one knows that this body impermanent and should be used as a tool, then this kind of thinking—“Oh, it’s happening to me. I am the target. I’m suffering!”—this vanishes. It rather becomes, “Yes, there is suffering, and bodies can feel pain,” and so on; it becomes less personal. We have to train this attitude while we are young and fresh. Likewise, we don’t learn meditation while dying; we learn it now.
Mantras like OM MANI PEME HUNG or KARMAPA CHENNO are always very good. There are also special mantras and certain breathing practices that can help. But the most important thing is to not take the pain too seriously and to focus on something else.