Twitching eyes for me usually means I'm tired. I've been burning the candle too much at both ends (usually - it's voracious reading that I can't put down, which causes this...)
Though - it could also be magnesium deficiency...
Nightmares...
I'm a lucid dreamer - so for me - I usually either change the nightmare whilst I'm dreaming it.
OR - force myself to wake up and then deliberately steer my thoughts away from it until I feel calm.
I may, when I lie back down to go to sleep - "program" myself by saying, over and over "I will only dream good dreams tonight". (My father taught me this originally, positive dreaming affirmations when I was a child).
If (rarely) I wake up horribly rattled by a bad dream - I may actually get up and do a banishing ritual of some sort - as I'm Wiccan and enjoy and believe, in the mental effect of such things on myself.
I also have a dream diary in which I write things down, like RiverRunsDeep. I find this very helpful.
I've done this for years and also have a couple of dream dictionaries to get some ideas of what might be going on in my subconscious if I can't work it out.
These days (after many years of writing and practicing this) - I only write things down if I don't recognise what they mean/are related to, are unusual, or re-cur so much, that I know I need to do some conscious processing in order to let them pass.
EXAMPLE of a re-curring nightmare I used to have (which I now recognise and manipulate lucidly if I have a similar one again):
I'm fighting vampires. (like in my own version of Buffy The Vampire Slayer

Infact, in the very first episode of this nightmare I exclaimed "where's Buffy when you need her??!!"

).
This dream is my subconscious telling me that I am fighting a kidney infection - I later learned (kidney infection=peeing blood. Loosing blood=Vampires you see. Interesting subconscious

).
If in my dream, I am able to vanquish the vampires - I know when I wake up, that with my own alternative interventions I should be able to cure myself.
BUT, if in the dream I loose - then I know when I wake up - that I should go and see my doctor and get some antibiotics for the infection.
I've managed for many years without the antibiotics now.
I'm so sorry that you are suffering this.j
I hope that it gets better.