How can we use meditation to get rid of pain?
You should try to invoke light in order to cure pain. Pain is, after all, a kind of darkness within us. When the inner light or the light from above starts functioning in the pain itself, then the pain is removed or transformed into joy. Really advanced seekers can actually feel joy in the pain itself. But for that, one has to be very highly advanced. In your case, during your prayer or meditation you should try to bring down light from above and feel that the pain is a darkness within you. If you bring down light, then the pain will cither be illumined and transformed or removed from your system.