You sound like a lot of people I see in my practice. I say that to say, what you are going through is relatively normal. Especially if you deal with anxiety in other areas of your life as well; I would be curious if that were the case?
The oversimplified answer is to get out of your head. How do you do that, right? Even though it is a word that gets tossed around a lot right now, I would recommend checking into mindfulness practice and anxiety based coping techniques. There is significant overlap, and they can be extrapolated to work in terms of tuning out the noise and tuning into the intimacy/sex.
Part of it is context. Is the “stage” (i.e., the place you are going to partake in intimacy/sex) set to allow for you to feel in the mood? I always reference movie scenes for my clients. Why? Because movies have to visually create a space that conveys a certain message and helps us to feel that sex can occur there, in that space and time. It isn’t much different at home. Music, lighting, bedding (if in the bedroom) all can add to or subtract from helping you feel more comfortable and in the moment.
The other part is your brain. There is a high likelihood that it will never just shut itself off or be quiet. Instead, try guiding your brain to actively participate in what you are doing. Use your five senses to completely experience your intimacy/sex. How does it feel when your partner touches you, when you touch him? What does your skin actually experience from the sensation provided by touch? How does he taste when you kiss him, or even when you give him oral? Granted, I do not expect the answer to be pleasant so much as are you mindfully present enough to be aware of what is happening. Lean into the experience and try to experience only that which is going on. If you find your mind drifting to off-subject matters, try guiding it back. What does he look like? What does his O-face look like? What noises do you both make, verbally or otherwise?
Anxiety is very real and can invade so many aspects of our lives. If this continues to be a struggle for you or is already a struggle for you in sex and/or other areas of your life, consider find a therapist in your area that can assist. As I stated, there are a lot of great coping techniques that can be applied to sex similarly to how we use them in daily life. Good luck.