Please don't hate yourself for something your husband did. How can that be your fault? In case this helps, we men are (mostly) pigs. I say this without trying to make fun of your situation. I have never cheated on my wife, but I (unfortunately) thought about it a couple of times when things with us weren't going well. I am glad I never did.
Most women and most men are radically different in this regard. I'm not trying to excuse your husband, but to say that you shouldn't attribute to your husband's actions the same motivations you would attribute to this behavior if it were you the one doing the cheating. Please, do not blame yourself for anything.