You and your husband live together in a home that you both share. His friend, who depended on the two of you in his dire time of need. Its one thing if your husband devoted time to him while he was there, since he was going though something, but discussing your personal info in front of him was wrong. Perhaps because he works with him they feel a closeness, and he may even talk to him at work about personal things that you were just unaware of until you saw it first hand, much like you might discuss your personal business with a close friend, things that your husband might not be aware of or appreciate if he was aware.
Saying what he said to his friend on Wed was very disloyal, and caused a rift between you and his friend that could have been avoided. The fact is you were doing someone a favor, that few people would, and both of them should have been appreciative.
I welcome your thoughts, let me know if you want to talk more.