You,re problem is actually a common one. You were attracted, flirted, communicated sexual interest to eachother and acted on it. As usual, straying ended in more unhappiness.
If a person is single, there isn,t anything wrong with flirting. If someone is married, the problem began at the initial attraction. There are millions of good looking guys out there but if you love your marriage commitment they are"OFF LIMITS". After noticing someone, its what goes on in your mind that keeps you away from the thoughts that will lead to infidelity. Marriage is hard work alot of the time and those love feelings are not always what keeps it together, otherwise there wouldn't be very many marriages that last a lifetime(there aren't that many nowadays because of this)
Part of the reason you are still so attracted to this guy is that God made sex not just for fun but to bond the two of them together.
If you are going to stay married you will need to forgive yourself, rebond with your husband by being intimate with him(even if you don't feel like) it and to get over the other guy ask yourself some questions;
#1 What is he paid for, training or having sex?
#2 If he were your husband would he respect that marriage more than your current one?
#3Has this happened with his job before?
You may not feel happy in your marriage for awhile as its obvious that you have a conscience, but if you give it time you can heal. In the future, however, try not to have close contact with a man you are attracted to. Sometimes its so tempting.Good luck.