Your comment reads condescending to me: "my pain is all in my head." But it's not, and treating my mental heath is treating the symptoms and not the cause. The best thing for my mental health would be an end to my physical pain.
People offering mental health treatment are not saying the pain is "all in your head"[1]. They're saying you deserve treatment for all your problems, not just a focus on one specific pain problem.
We've known for sometime that treatment for mental illness is more effective if it looks at more than the patient's mental illness - if it looks at all the biological, psychological, and social factors.
This concept is moving into physical health treatment, especially for long term pain.
And it seems that mental health treatment can reduce the amount of pain that people feel.
[1] I'm not sure if you realise just how dismissive this sounds. Mental illness is debilitating and one of the top ten causes of years lost to disability. Those people aren't "making it up", which is the implication many will draw from your "all in my head" comment.
Combine this with other therapy methods and you have rid yourself of pain, or at least rid yourself of the holds it has it over you.
(Although personally I think while mental health is a large component of chronic pain management I'd say the pain management itself is still the primary issue at hand)