For me, I loved math, so I basically had the opposite reaction toward it as you're now experiencing. I would pay careful attention when learning all the new rules and operations, so that when I was faced with the math problems, I could excel with confidence in my answer being right; however, I did experience a lot of resistance when trying to learn other subjects that were new or foreign to me, especially when there wasn't a clear answer for how
to do it.
There are a few keys here that I've learned post-graduation that have been a result of my self-investigation through DIP and JTL blogs. Firstly, my drive and motivation that allowed me to have a keen focus within mathematics was of a mind starting point. It was the desire to be right/certain, and the desire to be better than others. When I progressed into more difficult levels of math and I started falling behind my peers, I essentially gave up, took easier math classes, and then chose a college major that had no math in it. I did not push myself through the challenge when I didn't believe
I could be the the best/better student...sad story, but it's a consequence of my starting point.
The second main point was how the resistance toward other subject areas was experienced, how it affected me, and what the solution is. Very similar as how you described your experience, it felt like my mind was shutting down, getting hazy, thinking about other things, being easily distracted, or actually looking for distractions! I essentially developed a pattern of going into procrastination whenever I didn't know how
to do whatever I was working on to a level of perfection. I don't know if you struggle with the perfectionism and desire for greatness as I did, but that factor of not knowing how
to do or approach the material I was learning or working on was often why I sought distraction and allowed focused to shift all over the place.
If you don't know how to do something, make learning how to do it your first and only goal. The tendency to become overwhelmed in the mind often starts with trying to do Step 2, 3, 4 and/or 5 before applying yourself fully within Step 1. It takes your directive principle here because the mind wants the quick and easy way, so if it seems like you can get a multi-step process done in one go, for example if you believe you don't need to revisit the foundational understandings because "I've already done it," "they're so easy" or whatever excuse you come up with, really stop, forgive those ego-driven thoughts, and throw yourself into the basics to build a strong foundation before moving on. Figure out what you don't understand, write down all the questions and uncertainties, get the answers, and practice applying them. When they are integrated well, you will fly through your math problems and rebuild your confidence and self-esteem.
Also, if you find that your distracting thoughts are reoccurring, write about them. Get them out of the cycling in your mind so that you can practically gain insight into them, as well as clear them, so you'll have one less thought vying for your attention when you're trying to focus on something else.
Enjoy the process!