Until you learn to become comfortable -- really, down deep, gut level comfortable -- with the fact that you screw up and make wrong choices and choose less-than-perfect words on a regular if not daily basis and yet you are STILL lovable and valid, you will never be able to move forward with a healthy relationship with *anyone*.
Grant your husband his own agency. It is NOT all about you. Regardless of what he would have you believe, it is highly unlikely that you have SO much control over him that any one bad day or bad choice from you will decide his future. He will make the choice about your marriage based on what he determines is in his self-interest according to what inside his own head -- yes, you have some influence over that by your actions, but there is undoubtedly a LOT MORE to it that you have NO control over. It's not something you can control or force, not even by being "perfect".
Forget your relationship with your husband. You need to put the lion's share of that focus on your relationship with yourself.
"Show me a completely smooth operation and I'll show you someone who's covering mistakes. Real boats rock." -- Frank Herbert