Let me guess - it was probably a man who abused her. Serena's absolutely right (BTW - glad to see you posting again, Serena, you've been missed!)
If your dog isn't too big, you might try holding her in your lap (maybe with a towel under her) and having your husband sit next to you, talking to her in a very soft, quiet voice, giving her little tidbits of some special treat.
It will also help her if your husband feeds her at least part of the time and if he will play with her outside and/or take her for walks. He might want to start a habit of saving her a last bite of his food and sharing it with her; that's a tremendous bonding behaviour among dogs, and will help establish him in her mind as her pack leader, someone who will protect her and take care of her, not hurt her.
It's not just her lack of self esteem that needs to be addressed, but her fear of men. It may not even be all men; your husband may physically resemble someone who abused her or have a similar voice or smell. She needs a chance to learn that he is going to take care of her and not hurt her.
By the way, for the carpet, a solution of oxygen cleaner works wonders, then follow it up with an odor neutralizing cleaner (you can find good ones specifically for animal accidents at a pet supply store). When the problem is solved you'll probably want to shampoo the carpet, but cleaning it like that should keep you from having to lose your damage deposit.