Can you accept (and love) yourself as someone who made these mistakes? Can you distinguish between you and the actions you see as bad, or are you allowing your bad behavior to identify you as a whole person?
If you can accept and love you, then he can. If you can't, you can't love or accept him. No amount of self punishment will fix yourself or this. As long as you punish yourself, you are likely to punish your H when he doesn't meet your expectations. Start accepting yourself, stop punishing yourself, and your marriage WILL reflect these very positive changes.
“No problem can be solved from the same level of consciousness that created it. ” – Albert Einstein