i really need advice asap.

So i just found out that my boyfriend is only dating me because he feels bad. I want to break up with him asap but i have no clue how to because i still have strong ass feelings for him. I literally cant bring myself to do it. And i cant tell him that i know that he's only dating me because he feels bad because he told my friend not to tell me and he'll be mad as fuck at her and it'll ruin their friendship. How do i break up with him?