the term for a defensive reaction where a person who is experiencing disturbing thoughts will retreat into a fantasy world so they avoid harming themselves and others.
FLIGHT INTO FANTASY: "Joe took a flight into fantasy when he was anxious and thought he would hurt people."