You just asked a question in which you stated that you were dreaming about your boyfriend's friend and couldn't stop thinking about him. Pick one of these two, and then you can focus on trying to fix your relationship if your boyfriend is the one you choose.
Well you asked a question about you liking your bfs friend so do you really love him? Or his friend? I think you should break up with your bf because it doesnt seem like you love your bf anymore, so just pick one but make the right choice, good luck :) hope this helps