cold shower. [or in the words of Homer Simpson: think unsexy thoughts]
i don't know of a spell to help you. magick cannot instantly take away things, we are animals, we all have urges, unlike other creatures, we have an advanced brain that can determine right from wrong and stop up. sometimes sex drive can overpower us, but you need to make a choice. if you both have a strong attraction to each other, and you both seem unable to control yourselves ['i don't wanna cheat but have come close'] the two of you will probably have to be adults and decide if your friendship or marriages are more important. you don't have to break off your friendship, but spend time apart. spend more time with your spouse, and less time with your friend. limit your interactions to social gathering, and perhaps the attraction will fade away.
i would also be upfront and honest with your husband, especially if the four of you [including your friends spouse] are rather close and suddenly aren't anymore. sit him down and ask him to hear you out. don't go into great detail, but say you have felt a sudden attraction to a friend and because you don't want the temptation you have broken off the friendship for a while. or, you could not tell him anything depending on how he'll react, but it's better to tell him now than later. perhaps a couples counselor to work through some stuff. counselling isn't a bad thing, sometimes you need an impartial third party, even if your marriage is fine.