When a person finds themselves gripped by panic they initially feel that they are losing their grasp on ‘reality’.
They then become extremely watchful of their thoughts and this ANTICIPATORY ANXIETY that they might think ‘abnormally’ CAUSES some people to think the very thoughts they fear.
It’s just a variation of the anxiety cycle.
The person can usually sense deep down that the thoughts have nothing to do with how they REALLY feel (if they could wave a magic wand they would get rid of them immediately) but the more they get locked in the cycle the harder they find it to break free.
At particularly stressful times they even wonder ARE the thoughts how they really feel. This is VERY common and it can be VERY distressing the longer it goes on.