Everything you describe tells me you have an active unresolved issue in your mind, probably about this woman, and although you try to put it out of your mind and comes back when your mind is in the transition to sleep...find a way to talk to someone about this issue until you come to some place of resolution...you may be able to get some help thinking this through with one of the "sessions" at my website www.myvirtualshrink. there is a session there about dealing with ex- girlfriends or boyfriends that may help you think this thing through.
i mean thanks for you help doctor.