I think the folks going on about personal agency and relationship repair don’t get this
But there actually is. You actually entirely have a choice in the matter. Think it through. There are different ways you could go, but if you love your husband and want to be with your husband, then start exploring how you can repair your relationship. This could be the impetus toward something good.
Get some novelty in the sexual part of the relationship
But there is. You have agency in this situation, on a lot of counts. You can choose whether or not you have an affair with the guy. You can choose whether you decide to work on your marriage and start figuring out what went wrong.