You first have to decide as a couple if her issue really is sexual or emotional. Sometimes a person can have significant self esteem issues when they gain weight and even when they have such a long affair. An affair can be a desperate attempt at feeling positive about yourself. I would meet with a therapist to see if her issues are a result of inner conflict or a result of work that needs to happen in the relationship. Therapy or marriage counseling can be quite effective because the real reasons for distancing yourself from your mate can be discovered and communication when improved can lead to changes in your sex life. It is difficult for two people on their own to work on emotional boundaries when it has been such a long period of time. You can work on the romance when you know what makes both of you feel special. I would also begin to treat the marriage like a romance. This means spending quality time together in a romantic setting. Sometimes people do not allow for romance but only sex. Sex is an emotional experience for women. Allow for quality time for you and your wife. If you have not processed the reasons for this affair this may act as a hindrance for this process. To work on communication use my all time favorite - Mars and Venus in a Committed Relationship and Mars and Venus in the Bedroom.
Please choose positive feedback so that I am compensated