The Bible calls us to put off ungodliness and put on godliness.
In this situation, “putting off” is fleeing the situation (2 Tim 2:22); “putting on” is pursuing righteousness with other believers.
If you have to interact at work, keep it strictly professional. If you can’t keep it strictly professional, do something drastic, like getting a new job (Matt 5:29-30).
There is no action too drastic to prevent the destruction of your testimony and marriage.
“Pursuing righteousness with others” at the very least means telling someone that you trust and asking them for help.
Under no circumstances should you tell the person you are attracted to.
A great, godly protection for any marriage is to cultivate deeper intimacy with your spouse in every area of your marriage.