I seem to remember hearing a medical term for the act of causing pain to one part of your body to relieve a chronic pain elsewhere in the body. For instance, someone who suffers from chronic back pain might break their finger so that they can stop focusing on their back pain. Or someone with a broken arm might intentionally drop something on their foot so the focus of pain transfers to their foot for a while. Is there such a term for this type of pain management technique?
I was thinking this was called "deferred pain", but I cannot find anything on Google for that. Most of the search terms I've come up with lead me to "referred pain," but that's not the term I'm looking for. That's completely different than what I'm talking about.