Difficult situation

Alright, so a friend of mine (let’s call her Emily,) was very much in love with another friend of mine (let’s call him Sam). They basically grew up together and were pretty close. They both have had really shitty relationships in the past and I think that was one of the reasons that he kinda closed himself off emotionally, in a romantic sense at least. She has been depressed for a few years now and she has sort of attached her happiness to him when he doesn’t feel that way for her. The worst part is that I really truly love him in that way... I told Emily as soon as I realized, so did he Because he knew he loved me and she was really mad at me and told me she was “grossed out” and that I had to know it wasn’t okay. But I’m conflicted because I know that this is real. Both Sam and I love and care about Emily but she wants us to cut off all contact with each other. We all work at the same place and there’s really no avoiding talking with one another. But even past that I can’t find it in me to stop talking to him because he’s made me so happy and he’s an amazing guy. I feel like this is really cheesy but I’m just trying to organize my thoughts. Any advice would be greatly appreciated. I don’t want to have to cut off someone I care about to keep another.