If a goal dominates your thoughts to the point of preventing you from being able to focus or relax, then this is a sign that your mind is not coping with the goal - which can lead to an increase in your stress levels and prevent you from swimming well.
When this happens, the secret is to modify the goal in a positive way so that your mind will accept it (without stress). For example, my advice to this swimmer who was becoming obsessed with making the cut for Nationals was this: I advised her to move beyond her current goal and to 100% assume that she would make the cut. Then she was to instead plan ahead of 'making the cut' to the NEW goal - which might be (for instance) 'to win a medal at the nationals'.
A simply change of goal like this does several things; firstly it moves your focus away from whatever is causing the stress, which allows you to relax and swim better. Secondly it sends a powerful message to your subconscious that you have already made the cut (which means it will move mountains to make sure you do), in order to help you achieve your new goal of 'winning a medal at the nationals'.
This is a far more positive goal than the previous one, plus it can help to evaporate the stress which the old goal was causing. Very simple, but highly effective.
So if you find that your goal is causing you stress, examine it and discover why - and simply make some changes to it until it no longer bothers you. Your goals should excite you, not terrify you! Mind you, any ambitious goal will always involve a little fear, but it should never be so much that it dominates your every waking thought - and so this is the sign to watch for.
Always make sure that your goals are user-friendly, so that they serve you, not the other way around.
The Mind controls the body, and the mind is unlimited. The best of success,