My feelings betrays everything and everyone possible

So I have a relationship a few years back. He is a very kind, nice guy that is definitely husband material. I could go on about how amazing he is, but it's simply too much to bore you with. We have a distance relationship due to economic reasons since July (he is unemployed and moved back to this mother, I got a very temporary job close to my mom and moved back to her). And there is another, male friend of mine, which my boyfriend have met a few times. He currently lives in a third city (where he has a kind of successful beginning of a career), but once we all three lived at the same campus. (All of us is approx. 25 years old) Here is the deal: I've always had my suspicions that my friend have feelings for me, but he have never come out clean about it, and I value him as a friend way too much to bring it up. Heck - to just call him my friend have never really been enough. 
Last week, I visited my friend. Everything went alright, and even if we did not talk very much and mostly went on walks, I had a great time.
Now in hindsight, I sort of felt a form of belonging, but it was easy to wave away. He is a great friend after all.
And then, he explained his emotions. That did not exactly take me by surprise, I already knew about it after all. Before I even explained the situation he regretted it and asked for forgiveness.
It was all and well but I felt extraordinary sad. I did not expect that him telling me something that I already knew would have such an impact on me.
So the next day before I went home, we ate lunch in complete, awkward, silence. Until I broke it - with tears.
It felt as my heart was ripped apart like a piece of gelatine candy. I could not contain it at all. This guy was definitely more than a friend, but I also have an extreme attachment to my current boyfriend. I made a fatal mistake: I kind of hinted to him about how I felt in that very moment.
I am back home now. I have no flying fuck about what to do. I've experienced this kind of shit before, but never with my current boyfriend and never in with a non-erotic kind of love. It sounds cheesy, but before this the word "soulmate" had no meaning to me what so ever. I can't help to wonder what the hell is wrong with me. I am usually good at controlling this and are able to pick and choose the guy in a hardboiled, cold way, even when feelings betrays me. If it had been a lustful, passionate kind of feeling it would have been a lot easier to control it, ironically.
Before going distance on my current relationship, I decided to tell my boyfriend the following: "If you ever feel attracted to someone else, go for it. Just tell me about it and never lie for me." His response was really bad, he did not like the idea that I believed that he would ever do such a thing. My friend and I have always had an extremely tell-me-everything-honestly kind of friendship, so he already knew about my tendencies and how much  dislike myself for it, as much as I know about his life and what he feels shame about.
There is, what I can see, any good way out of this. I just need some advice about the next best thing.
Please don't give me that "if you really loved your boyfriend, you would not even think about this" because it's not that damn simple. A First-in-first-out-policy only works at workplaces.
Additionally, No, I have not done anything with what I thought was only a friend. We have not had sex and we have not kissed. The only thing that cheats right now is my feelings.