Well, I'm not sure about the entirety of your situation, but you need to remember that your relationship to God doesn't have to be marred by your relationship to your husband. He has free will and can make bad choices, but God will always love you.
What issues, exactly, are you struggling...