There's A Link Between Physical Pain, Anxiety, And Medication And It's Basically A Horrible Feedback Loop
A lot of people who suffer from chronic pain take anti-anxiety medications, and according to neuroscientist David Linden, author of the new book Touch: The Science of the Hand, Heart and Mind, this isn't only because anti-anxiety medication helps pain in general, but because people with chronic pain often experience severe anxiety about the pain, which then manifests itself as more pain, which is then briefly cured by anti-anxiety medication until the pills run their course and the anxiety and pain strike again. It's basically a vicious cycle or a horrible feedback loop, and the most effective way to nip it in the bud is to help anxiety patients deal with their worries associated with the pain instead of just trying to cure the pain as a temporary measure.
I have a lot of personal experience with this vicious cycle. When I was 14 years old, I was diagnosed with Reflex Neurovascular Dystrophy (RND), a painful, chronic disorder that caused me to have frequent pain in my joints and fingers. Though RND has no particular trigger, it can be exacerbated by stress, and one of my big stressors when I was first diagnosed was how the pain would affect my day-to-day life. For example, the RND was so bad I sometimes wouldn't be able to walk to class, type my essays, write my notes, or get dressed in the mornings because my joints would freeze up. Because of this, I was constantly worried about having an episode in front of my friends, while I was giving presentation, or at other inconvenient and potentially embarrassing times (let's be real, my primary concern at 14 was embarrassing myself in front of my numerous crushes, so there's that).
I can say with firsthand experience that it was incredibly effective for me to get treatment that helped me feel less scared of my pain and helped the anticipation decrease a little. This was done with breathing exercises, yoga, and physical therapy. As cheesy at it sounds, finding a "balance" between my body (which I felt at the time was constantly kept betraying me) and my mind (which was constantly fearing the next betrayal) helped decrease the pain, and though I did sometimes rely on medication and talk-therapy in addition to those other things, I think the best approach to coping with anxiety, chronic pain, and anxiety-based chronic pain is to combine all those things.