Most Helpful Guy
It sounds like this was an impulsive thing on your part and the guy was well being a guy, but not a gentlemen. You were in an emotional panic and he was "there" for you and took advantage of your frame of mind, you were worrying about how bad things will be, about being alone and not finding someone else. Assuming you did not have sex with your friend as a way to make your boyfriend jealous I would just hope he might take you back.
Seriously I would reconsider your friendship with that guy, what he did is to me almost like taking advantage of a woman who is intoxicated as you were in a state of mind where judgment was out the window.3