Yes, we're all human, but are you sure you want or need to be friends with M? It is usually safer for recovering from the loss of (your) love-project to not keep up the (peer-group definition of) "friendship" until your strong emotions (the basis of "erotic connection") are gone, so you won't keep unconsciously reaching out for his heart, getting response in kind sometimes and getting rebuffed at other times. And also running the risk of noticing his relations with the other woman and being hurt. It's completely normal 4 friendship" to act as a cover for still getting to see and think about him, getting to drink from the fount of good feeling. "Philia" is friendship love, but it's in the same family as "eros." [I don't mean to be preaching, but it's been socially "normal" all my life for exlovers to assume they can & should be "friends." And even social-scientific research does not bear that out, unless the love was neither long nor intense, compared to the experienced friendship. American culture is particularly misleading in handling cross-gender friendship & romantic love.]
Even though this love didn't last a year (I guess, tho I'm not sure how long you admired and "friended" him before you knew you wanted a relationship or delved into body intimacies) your dreams SHOW that you've opened up a strong psychic connection with him that's still there: that's a clear sign of loving. So I understand recovering from such a love like this: 1. You aren't completely healed from the psychic communion until you're able to love someone else as fully or more so. 2. Every time you THINK about him (or talk to him, even on Facebook) it's like you're picking up your psychic telephone line to him, and each telephone-call STRENGTHENS the fibers of your erotic/emotional connection. Sex & love & other emotions all travel that pipeline and nourish the conduit, FOR BETTER AND FOR WORSE. That's why you're reading him (probably pretty accurately) in your dreams. It's even possible that M has glommed onto another unwitting eros-target to unconsciously block out his connection with you, and it hasn't succeeded fully yet. [I've seen a few dreams on JA in my 4 years where the exBF/GF even deputized the newGF/BF to humiliate the dreamer, so s/he'll stop the psychic "visits"]
What I found I needed to do when I was strongly connected to one exlover was this: Imagine my personality was like a mansion with many rooms in it; and in one of those rooms was the woman I'd loved intensely. When I sauntered down the hallways of my mind, I could notice that the door to her room was slightly open--but I knew I could get very engrossed if I even LOOKED inside. So I'd figuratively close the door and walk on by; I'd find something or someone else to focus on, preferably something or someone of interest or beauty.
I was in effect noticing when I was unconsciously about to pick up my psychic telephone, and then consciously putting it back down and redirecting my attention to somewhere else. It took me 5 years to find someone else that I loved as intensely, and with more broadbased interest than her, who I proceeded to marry (I was 41 when that 3rd love began).
Around 2 decades after that I spent a week of self examination for my Psych of Relationships course writing about the types of emotional dynamics involved in how I loved each of my girlfriends, so I reopened the doors to each of those rooms in the mansion of my mind for a series of visits. I also had a few dreams then about remodeling the inside of a little logcabin in a sacred spot in the woods that I included in my 25,000 word document. I'm so glad that still exists on my computer--because I could revisit it and add a bunch more. And I'd probably get embarrassed by the attitude I had 10 years ago when I wrote it. I'm sure my inner self could use some more remodeling by now--you have to get rid of the old furniture before you can put new stuff in.
I have the luxury of a long view, including a long and rich lovelife, before my 30 year marriage. So I'm glad when I might be able to provide some value to you.