How do I cope?

My husband had an affair. I flirted with other men. We were separated because we had been fighting so bad for months and have been completely miserable. But not doing anything to better ourselves. He screwed her after work in the back seat of her jeep after getting off the phone with me and telling me he would never cheat on me. And I told him I hadn’t been talking to other men. Now we want nothing more but to work out our problems and make this work the right way. We have hit rock bottom. Can this be saved?