Shadow tends to emerge when the Ego is feeling utterly defeated. If you have had a loss, a deflation, a terrible professional or personal disappointment; be alert - this is golden time to write. Because your Ego is not on High Alert. The attitude is "Fvck it, I'm a failure anyway, so I might as well write the way I want to instead of the way I've been told to..." The greatest works of art have been created under these conditions.
It's the same foundation of all spirituality that ultimately leads to enlightenment. The letting go of the ego. The natal self that taunts, whether it be social factors or genetic predisposition.
When you are in that stage where you're mind takes second fiddle, enabling the true you to shine through. The part of your Self that is able to access unlimited information and allows for unlimited potential. You're in the moment or at One-ment. That's the true state of 'mind' you want to be in when you write. You are totally involved in your characters, your story, and it's amazing how things coincidentally just fall in place, even though consciously you were unaware where the story was going in the first place. You are in the timeless zone of the present moment. And it applies to all aspects of life.
When you forget yourself, you will be yourself.
Now suck on those tea leaves.