It’s all in our mind, a false version of reality. If you can change your perception about this whole situation and instead of taking it seriously, you can treat it as a funny silly thing.
Apparently, he has nothing to do with you, you have nothing to do with him. The entire situation is actually funny, if you see it that way.
You did the right thing by admitting your feelings towards him and he did the right thing by ignoring you and staying committed to his wife.
Just like you are confused about everything, he is in the same situation and unable to deal with it. See him as a kid in an adult body.
Just pay attention to important things in your life, your health, money matters and your love life. Just letting go will solve this matter. Laughter is the best medicine.