OP- I had a similar situation. My marriage hit a rough patch and at the exact same time, a man came into my life through work and the attraction hit me like a ton of bricks. He was divorced, gorgeous, charming, successful, kind, sexy as hell and I started fantasising about him constantly. It was almost like there were three people in my marriage- me, DH, and him (in my imagination). I thought about him every single day. It was like torture.
Nothing ever happened between us but it was obvious the attraction was mutual. Our relationship never crossed a line, and always remained professional and friendly, but every time we had to meet for work it was like lightning flashing between us.
In my mind he was the perfect man- you wouldn't believe how perfect he was in my imagination. He became this shining rescuer figure at a time when I felt very very low.
As time went on, I started to see his faults in the cold light of day. Of course, none of us are perfect and I think it was so shocking to me purely because in my own mind I had built him up so much. Then, some stuff happened at work and I saw what he was really like. Dont get me wrong, he wasnt a bad or horrible person, but there were aspects of him I did not like at all and as I said, it was extra shocking because in my mind thats not the way he acted in my imagination. I suddenly realised that I had built this entire fantasy in my mind and none of it was actually true. That was the kick up the arse for me to stop it.
Happily, since then, DH and I have sorted out our issues (for which we were both at fault) and we are happier than ever. Sometimes I look at him now and think I am so lucky to have you, and the best part is, it's real.
As for the other man- he is still single and I now know why. I cringe when I think what could have happened in a moment of madness - if I had run off with him it would have crumbled within months because he was far more messed up than he had appeared at the time.
Do not be fooled by people who appear so wondrous - you have literally no idea what they are like in reality and it's very dangerous to let your imagination feed you a lie. Just because something is shiny, doesnt mean its gold.