Well, being a woman, I know the importance of feeling love and connection mentally with a man to to feel intimate. In my experience unless the fire is there it can almost be repulsive to have sex with someone...but, this is just me. I guess what I am trying to say is the mental connection still between the two of you, it doesn't sound like it but I really have no way of knowing. Perhaps if you guys took it slow and spent more time together doing and sharing you time ...good times, simple things, but just sharing perhaps it could help. You know, getting to know each other again.
I am by no means the person to be giving anyone advise on relationships as I have failed royally at them but can just relate some of the thoughts and feelings I have contended with in a relationship. Marriage counseling may help also, but, I have never had experience with marriage counseling so I can't really say.
Most imortant thing for you is to remember there were reasons why you had an affair. You were lacking the love and closeness from a man. Someone came along an filled that void that you were not getting fulfilled. Please do not beat yourself up over this as you are only human and have needs. It sounds like your husband has issues also. Your marriage was in trouble with issues when this happened it . I hope you can work things out and it doesn't sound like an overnight fix and just like any marriage, both people must be willing to work together to make it happen. .
I feel like I am rambling, I'm sorry. I wish you the best and hope that you and your can get this worked out and I wish both of you happiness.
Its best to distinguish between what is a relationship issue and what is an issue with medication. Some medications can have a dampening effect on the libido but that's a side effect not what they are there to take for. If the relationship isn't working out due to lack of physical compatibility best to go to relationship therapy and discuss what is going on. Medication is neccessary as treatment but you can't medicate real feelings. Those should be discussed over with a talk therapist. There is also a specific forum to discuss relationship issues as well.