It’s not love OP, it’s infatuation and nothing more.
The first step towards getting past this is to accept that you’re not in love with B, you’re infatuated obsessed, in love with the person you think he is and the amazing life you think you would have had together if only things had been different. But they’re not, and the reality is almost always completely separate from the fantasy.
And I’m going to go one further and say that B probably doesn’t feel any of the things he said he did. He probably just said those things to let you down gently, but it’s the old “it’s not you it’s me” speech, designed to soften the blow but the reality is that he was almost certainly put off by this over infatuation of yours given he feels none of the things that you say you do.
Have been there. I used to fall hard and fast for people. But I always used to take a step back and once you see those people for who they are in the main they’re just other people. Some turned out to be arseholes just because they were, some turned out to just be ordinary decent men just living their lives but looking back I can’t imagine ever actually ending up in fulfilling relationships with any of them. My fulfilment had to come from myself.
If you’re generally unhappy in your marriage then it’s possible that it’s some of this which drives your infatuations, because you’re wishing your own life was different. But an infatuation isn’t a reason to leave your marriage. If you’re unhappy then you should leave anyway, regardless of whether there is a B in the background.
I left my marriage after developing intense feelings for someone. That actually passed of its own accord, but I still ended my marriage because there were a lot of reasons why it wasn’t working. And I left in the knowledge that I would be single, and interestingly that turned out to be enough reason.
Now I am in a relationship, but my life is infinitely different, and I know now that I certainly don’t need a man to be fulfilled, I am who I am because of me, and that works for me.
You can do the same. Don’t go because you need somewhere to go, go because you need to not stay.
If there is a relationship in your future then it will happen, but it needs to happen because it’s meant to be not because you need to find an out from your current situation.