No matter if you are married or not, it is never a good idea to establish a romantic relationship with a colleague whom you work with. The main reason is that if you break up, then you have to continue to work with that person. It would be uncomfortable to work at the same time and it would be troublesome to quit and find a new job.
If you start to have feelings for a colleague, it would be best probably to avoid that colleague. If you are still in love with your spouse, then you should stay in the marriage and avoid the colleague. For things that I can’t have, I just pretend that there is something majorly wrong with that thing. Then I would not be attracted to it anymore.