So sorry about your headache and pains.
Years ago I experienced a particularly stressful, anxiety inducing year and my only way of coping was physical activity, mainly basketball. I ended up developing stress fractures on both shins. Ultimately I had to give up basketball which mad me depressed.
Shortly after I woke up with a horrible headache. After three days I went to my primary physician. Two weeks later, still with headache, I was referred to a neurologist, who ordered a CT scan, blood/urine work, and performed a spinal tap. I was terrified. I started feeling sick to my stomach and a general feeling of malaise. For several days all I did was lay in bed thinking the worst, unable to eat much. I eventually developed lower back pain either from laying in bed several days straight or maybe it was psychosomatic.
All the tests came back negative, which was a relief, but I still had the headache. I was diagnosed with chronic headache disorder. I ended up having a headache that varied in intensity for 13 months. It was a nightmare.
During the first several months I was a wreck. Every weird twinge of pain in my head that was different than the constant pain freaked me out. I became sensitive to high pitched sounds as if they pierced through my spine, probably from chronic anxiety. I had 5-6 anxiety attacks, fortunately mild from a physical symptoms standpoint. No pain, just a strange sensation up my neck and over my head, like a creepy hand going over my head, along with an intense feeling of fear. I will say that the first one was terrifying. Once I realized what it was I was able to ride out the other ones more easily. I became very depressed. I began to think that this was going to be my life forever.
The neurologist wanted to put me on medication, but I was too scared to. I decided not to take any. For me it was a last resort.
What got me through it and eventually made it go away was gaining back control and changing the way I thought about it and my life in general. I cried a lot because of the pain, but I also found myself processing things - regrets, guilt, etc - that I had held onto for years. Things that I kept to myself bottled up. The floodgates opened. I realized that I hadn't cried in maybe 10 or more years.
I also started eating really healthy (not that I ate unhealthy to begin with), which made me feel like I was doing something good for myself. I started to socialize more. I had withdrawn from people because I was in pain, which was no good. I began taking walks. I started telling myself over and over that I was going to recover, that I was going to get back into fishing, a pursuit I thoroughly enjoy. The following year I started fishing again and at some point the headache went away. That first fishing trip was so therapeutic. There was so much going on, from the wind hitting my face, to the sound of it through the trees and grass, the rippling of the water, the lush greenery surrounding me, trees and grass bowing in the wind, not to mention my focus on actually fishing, that I forgot about the pain.
Even when the headache went away I questioned it. My normal had become being in pain and I had forgotten what it was like not to be in pain. I didn't even know if it ended suddenly or gradually. All I knew was that I wasn't in pain anymore. I was free.
As you can see the mind can cause all sorts of crazy things. I was not physically sick. For whatever reason(s) my body has a tendency to manifest physical pain as a result of emotional pain, stress, anxiety, etc. The worse the emotional stuff the worse the physical pain.