I've had dreams that include my ex if i think of him in my waking state. You've gone so far as to fix a current image of his face and body in your mind , by looking at facebook, so it might take some time for you to stop the dreams, but i believe that you will. First, if it happens, don't allow it to mess with your head. It is not a big deal if you don't make it a big deal. Let the hype die down, and time will take away from the images you sought out. "This too will pass" is something you can tell yourself, and redirect your focus away from obsessing on any thoughts of this ex.
This is an article i read for research that could be helpful to you.
"Each night as I drift off to sleep, I adamantly refuse to use this precious time to review anything that I do not want to be reinforced in the hours of being immersed in my subconscious mind. I choose to impress upon my subconscious mind my conception of myself as a Divine creator in alignment with the one mind. I reiterate my I ams, which I have placed in my imagination, and I remember that my slumber will be dominated by my last waking concept of myself. I am peaceful, I am content, I am love, and I attract only to myself those who are in alignment with my highest ideals of myself.
This is my nightly ritual, always eschewing any temptation to go over any fear of unpleasantness that my ego might be asking me to review. I assume the feeling in my body of those I am statements already fulfilled, and I know that I’m allowing myself to be programmed while asleep, for the next day I rise knowing that I am a free agent."
All the best to you, let us know how you're doing?