
Nightmares are indeed bad things. But, yes, it is your brain processing all those thoughts.
Try and "intend" to alter your nightmare, before falling asleep tell yourself she won't be hurt in any more, and then maybe you will change the outcome of the nightmare...
I'm glad you have been doing well. Sometimes things wait until you are in a good place before more processing is done. It isn't easy, but it's easier when that happens.