This wasn’t meant as a comment saying I got a doctor’s note casually (not that I think you’re suggesting that interpretation, I’m just realizing it’s important to clarify). I got it because I was sincerely concerned about the cognitive impact going into the office as demanded would have on me and my work.
If you have a similar response to sensory stimulation, I highly recommend looking into it! I’m coming from the perspective of it being common with ADHD and ASD, which aren’t the only bases for it; if you mean headaches literally, do yourself a favor and talk to your doc about why sound or any other sensory issue might be affecting you that way.
If I had to guess, that sounds an awful lot like hyperacusis. Which is more common in ADHD, along with auditory processing disorder and potentially even tinnitus.