Here's my own personal thoughts on when to reveal an affair and when not to reveal one, and others might disagree with me here, but....
If someone has had an affair, figures it was a huge mistake, learned a lesson, realize they love their spouse and want to stay in their marriage... then I don't see any good reason to tell them. That's when you focus on now and let the mistake go
But if you don't think it was a mistake, are still unhappy in the marriage, still vulnerable to other relationships taking prescendence over the marriage... then I do think it's best to reveal it. Otherwise you and your husband are both going to spend the rest of your lives in an unhappy holding pattern. And from what you've described I have a feeling your husband is just as unhappy as you are. In fact, he may be having an affair as well.