A person with two competing thoughts that cause psychological distress is an informal definition of cognitive dissonance.
The more formal definition, per Sarkis (2017) is: “Cognitive dissonance is the feeling that something is not sitting right with you”, and “…having contradictory beliefs.”
Cognitive Dissonance. When You Are Confronted With Opposing Information, Your Brain Resists (Sarkis, 2017) has advice in combating that emotional discomfort that can create anxiety.
Sarkis, S. A., Ph.D. (2017). Cognitive Dissonance. When You Are Confronted With Opposing Information, Your Brain Resists. Retrieved From https://www.psychologytoday.com/us/blog/here-there-and-everywhere/201709/cognitive-dissonance