IMHO there may be many reasons people choose to cheat but there are no excuses. All cheaters need to take responsibility for their actions in order for there to be healing and reconciliation.
My SAFWH was on ADs for years. They didn't help his depression, his rages, his feelings of inadequacy. Neither, of course, did his drug of choice, porn, strippers and the like. It wasn't until he was finally diagnosed as bipolar and given proper medication that his moods stabilized.
Bipolar is often cited as a cause for hypersexuality. I don't accept that. Neither does he. He cheated, he was a selfish, nasty person, and yes, his behavior lead him to a cycle of repeated behavior that was compulsive and addictive. Excuse? Nope. Those were rotten choices he made in an attempt to feel better, to feel normal, and yes, to keep suicidal thoughts at bay. He could have chosen to get help from a different doctor, but he didn't. He had a career, a wife and great kids, a beautiful home, and no obvious reason to feel like crap. He chose destructive ways to deal with his pain.
Zoloft didn't cause your husband to cheat. He chose that. But maybe a combination of things, the medicine included, allowed him to chose that path. Don't let him off the hook.