evey - have you established why you fell into the affair? That's the key to ending it and recovering from it - regardless of whether your DH is aware of what's happened and regardless of whether you stay together.
For now, let's take monogamy out of it. Even allowing for the fact that monogamy isn't for everyone, those who know themselves well either sign up to monogamy or reject it. A lot of people don't really ever question it and find themselves unable to live up to the ideal, but that's their responsibility to deal with, not their partner;s to check. Do you believe in monogamy yourself? How do you feel about your lover sleeping with his DW? I'm guessing that like most people, you probably consider yourself monogamous, but by all means examine this angle further if you think you might not be.
Happy, fulfilled and self-aware people do not have affairs. So you are either unhappy, unfulfilled or chronically lacking in self-awareness - possibly all three. Affairs are rarely about sex; they are more about fulfilling some need in the person having the affair, and that need isn't always obvious.
What often happens is that a friendship ignites an emotional connection that is lacking from the marriage. In the early days of relationships you get the sense that your partner is interested in everything you say, even the banal. That's a heady experience. A new friendship can recreate those feelings and be very addictive, quickly spilling over into emotional affair territory and then a full-blown sexual affair. What's important to recognise is that it isn't anything abut the other person that matters here - it's about you feeling important. To some extent pretty much anyone could fulfil the role of making you feel important by just listening to you.
If it started off much more because of sexual attraction, again it is because of how you feel - virile, desirable, more alive than you have in years, etc. It's actually much less about how attractive you find the other person once you start looking beneath the surface.
Quite often people sleepwalk into affairs. They're not actively unhappy, more mildly bored than anything. They have an average job, marriage is essentially ok but a bit stuck in the rut after years together and children, they've reduced their hobbies and interests in a bid to keep juggling the balls of marriage, children and job. Then someone comes along and triggers memories of what it used to be like to be younger, more exciting and dynamic, full of promise for the future, a person in your own right not just wife/mother/employee. Unless you recognise what is happening to you, it's ever so easy to fall for it.
The trick is to monitor not just your relationship but also your life. It is vital to find fulfilment in something other than your DC and your partner, something that is about you alone - because that is the key to feeling good about yourself and therefore being less vulnerable to outside influences. And on the plus side, it often makes the primary relationship stronger because those who place importance on their own wellbeing tend to be more attractive to their partners. It also makes you much more likely to refuse to accept poor behaviour from your partner - and for them to be aware of that and respect it.
Go away and have a think OP.