Peg,
I think I'm beginning to see where you and your husband are both coming from.
Lets take your perspective first: One, it sounds like you are excited about your residency and love it, so you come home to express this to your husband;
Two, you notice that he starts complaining about you talking about it so much which makes you upset;
Three, Seeking the understanding that you're not getting at home, you turn to a colleague. Also, you admire this colleague... he's a doctor just like you and you admire medicine... it's part of your life. Plus, this resident friend understands you and shows empathy to your experiences.
Four, you start to develop feelings for this other man, even though you haven't taken it anywhere, you still feel something for your friend that you have come to emotionally rely on for understanding.
Five, now your husband wants you to leave everything that you've worked for and you don't see how you can even get a new residency. So you're immensely frustrated that he's asking you to give up something you treasure.
Your husband's perspective: One, he feels when you talk about your residency that you don't see what he does as meaningful or even admire him for it;
Two, he starts to resent your talking about your residency, because of the fact that he thinks you don't admire him and probably deep down inside believes that you are putting your residency and self before him as superior;
Three, he sees you either talk about or hang out with or turn to this other guy for understanding and therefore gets put in the third-wheel place, when HE is your husband. So he has an impotent role of sitting back and watching you admire another man... and can do nothing about it, knowing that you are in "the residency" (which he already resents) with that man.
Four, he knows that you like/have some feelings for this man... believe me spouses know. He wants the relationship cut off. He's jealous. You're HIS woman, not that other man's and he wants you to verify that fact, by leaving the residency.
Five, he is beside himself not knowing what to do, probably feeling less than a man in your eyes and is jealous as all get out, because he loves you. He wants things the way they were, when He... not the residency, not this other man... was the apple of your eye.
Here's some advice, which you can take or leave. If you love your husband: Start admiring him for who he is and tell him that. Also, tell him that the residency was never first in your eyes, you just enjoy it and want to express how much you love it to him, because HE's the one you love.
End your relationship with the other man... sorry, I know he's a friend, but you're too close mentally to this guy... you need to be close mentally/emotionally to your husband. And if it takes leaving your residency: Consider this, who do you love more your husband, or this residency and this friend of yours. You can't be friends with this guy now, things have changed... and your husband will never trust you around this guy again... and tell me, how much can you honestly trust yourself around this guy?
Now, if you can't make these sacrifices for your marriage... which is totally up to you whether you think it is worth it or not... then divorce your husband.. because the situation as is, is not fair to him or you.