i feel like such a horrible person

my boyfriend kind of cheated on me but over text, i've been just flirting with one of my friends and i thought i'd caught feelings. i ended it with my boyfriend and now i can't stop crying and i know it's because i really love my boyfriend. but now i don't know what to do about my friend because he's happy i dumped my boyfriend, but now i feel like shit because me and my boyfriend have been dating for the last 8 months and we've been thrown some proper shit lately and i can't take it anymore we argue everyday and that's not healthy but i love him and i don't know what to do. don't comment if you're gonna comment something mean i already feel like shit enough