Your bf clearly likes you, and you going behind his back shows you have no real feelings for him, if you really cared for him, even as a friend, you wouldn't hurt him.
You tried to break up with him, and that didn't work, now that on his part is stupid. He should of accepted it, because then your just in a relationship which isn't really based on anything. Try to break up with him again, actually don't try, just do it, he has to accept it, he can't force you to go out with him.
If you really like his friend, then well AFTER you break up, you can take it from there, but really don't hurt him, and btw form what it seems like that boy doesn't seem much of a friend if he's willing to have this 'secret' relationship. In my opinion, boyfriend's friends are off limits! it's a 'no-no'! You shouldn't get involved! but hey it's up to you!