In psychology, reaction formation involves outwardly opposing one's true desires. This mechanism is similar to psychological reactance and projection.
Reaction Formation is a defense mechanism in which a person outwardly opposes something they actually desire, but find unacceptable. For instance, someone who fears people of another race might behave overly nice towards them. This type of response involves behaving in a way that seemingly contradicts one's true feelings. It is a form of psychological reactance, a reaction to perceived limitations on freedom. Another related defense mechanism is Projection, where a person attributes their own unacceptable thoughts to others, such as accusing someone else of feeling a certain way when they themselves are the ones feeling that emotion internally.
https://brainly.com/question/42827100