OP you are not an idiot or a whore, you are just a human being! And you are fallible, as we all are.
There must have been something in the OM or in your illicit relationship with him that met your emotional or physical needs, and you found it irresistible. We all do that, we all strive to meet our emotional and physical needs, that is the basis of all of our behaviour, all of the time. And most of us really have no idea, most of the time, what we are seeking to achieve or why. So much of what motivates us is subconscious.
What you have done has hurt you much more than anyone else, so far. And that's why I would recommend not confessing all to your husband. I am aware it is probably morally reprehensible to keep him in the dark, but would any good come out of telling him? He would be immensely hurt and your family would suffer, and how would that be helpful to you? I would recommend working through this on your own.
I would urge you not to punish yourself so harshly, but I also think that your self-castigation is serving a purpose. It is part of you coming to terms with what you felt and did. It is needed if you are to, as you say, rebuild yourself, but to succeed in that you will ultimately have to forgive yourself. In forgiving yourself you will learn greater compassion for the weaknesses of others. This is a learning and growing experience for you, and you will emerge a wiser, stronger person.
All the best and take care of yourself 