In psychoanalytic theory, reaction formation is a defensive process (defense mechanism) in which emotions and impulses which are anxiety-producing or perceived to be unacceptable are mastered by exaggeration of the directly opposing tendency.
Freud called the exaggerated compensation that can appear in Reaction Formation ‘overboarding’ as the person is going overboard in one direction to distract from and cover up something unwanted in the other direction, such as a person who fears war becoming a pacifist, convincing themselves that war is wrong (rather than the ‘cowardly’ position that war is scary).
Reaction Formation goes further than projection such that unwanted impulses and thoughts are not acknowledged.
Extreme patterns of Reaction Formation are found in paranoia and obsessive-compulsive disorder (OCD), where the person becomes trapped in a cycle of repeating a behavior that they know (at least at a deep level) is somehow wrong.