Denial is a psychological defense mechanism

Denial is common in Dissociative Identity Disorder, and exists in any disorder caused by trauma. Denial is a psychological defense mechanism,[1]:24 it plays a role in keeping the impact and knowledge of the traumatic experience(s) at bay although it also prevents healing from trauma.

The conflict between the will to deny horrible events and the will to proclaim them aloud is the central dialectic of psychological trauma.”
Judith Lewis Herman, Trauma and Recovery [2]In order for trauma experiences to causes a mental disorder, for example posttraumatic stress disorder (PTSD), the impact on the individual must be severe enough to cause clinically significant distress and/or impaired functioning in everyday life. The impact of trauma cannot be assessed by knowledge of the traumatic event alone. Being overwhelmed to such a severe degree can be difficult to accept. The effects of PTSD can involving a person denying their symptoms are posttraumatic, avoidance of reminders of the trauma (including diagnosis and treatment of PTSD), and minimization of the effects of the trauma. [3]:264 Avoidance is a key criteria in the clinical diagnosis of PTSD.[4]