Many studies have been done about the perception of pain and catastrophizing of pain, meaning that people will think the worst will happen if the pain is aggravated. It is known that our perception of pain does affect the physical aspects. This is why some people receive good relief from methods such as biofeedback and cognitive therapy. The issue isn’t so much of the pain is mental or physical, because both types of pain are real and can affect your quality of life. The issue is how to deal with it.
If you feel that your reaction to pain may be making it worse, it would likely be helpful for you to looking into getting an appointment at a pain clinic or investigating emotional and psychological ways of working with your pain.