It's obviously not good to go out with Mr. B. Continuing that will only hurt both of you more. I'm sure that you don't want to hurt and neither does he so it's best to just break it off for both of your sakes.
As far as the tell him/don't tell him problem it's mostly up to you. Only you know how you feel. Though, I will suggest that you tell him that way you have no regrets and the thought of him and you together isn't darkening your every thought. There is also a chance that, if he doesn't like you that way, you can still be friends.
I faced a similar problem recently. I liked a girl and we where very close friends, though I didn't want to ruin anything. But after a while I realized my every moment with her was miserable because I hadn't told her, and finally one day I did (via a note, I'd tried face to face but I never could.) the next day she came over and said, simply "I'm sorry, I'm in love with someone else. But, like you, they don't love me back. So I'm hurting too." I was heartbroken of course, I'm still getting over it... but my confession didn't ruin everything.. we aren't completely back to normal but we're... okay..
I don't know you, your feelings for him, your life, or his life.
So like I said. It's all up to you in the end. Just know that heartbreak can heal, but a could-have-been never will.