A shadow forms when you and your psyche are in need of protection. Shadows are repressed instinctual energies that are locked away in our unconscious.
They tend to develop in childhood, but can also be created in our teenage and adult years.
When we were punished, blamed, shamed, neglected, or perceived a threat, we felt unsafe. We then suppressed the parts of us that seemed to cause that unsafe feeling.
The repressed emotions and painful wounds were moved into the subconscious without our awareness. That is the way we learned to cope with the initial event and all other situations that felt similar.
But even after the threat was gone, the shadow stayed because our brain and body thought we still needed protection. It has grown in the depths of the unconscious ever since, unaddressed and still feeling that initial pain while also feeling abandoned. When this happens, we are cut off from being grounded and whole. We are removed from our inner child who first developed the shadow.
Since forming the shadow is a survival response, it can be difficult to release. Relating to our trauma as a part of who we are, as a part of our identity, is common. Furthermore, we often shame ourselves for having a shadow, leading us to repress it even more.