What a dilemma

My bf of 6yrs has talked to girls and what not on different occasions and i have caught him I’ve been so nice about it for so long like i took it and worked with it he broke up with me twice because he had many things going on, but the last time he broke up with me i fell to my deepest, i was so depressed, felt ugly didn’t eat was so so bad it was horrible i felt so much pain i was so heartbroken cause we lived together for a few months he left me because according to him he no longer loved me but one of his friends approached me and was helping me out through it, he would check up on me take me out to eat, was a gentleman and i was just in such a vulnerable space long story short i almost had sex with him but didn’t at the last min, this all happened when i was single now somehow my bf found out and is calling me a hoe but isn’t letting go of me and is throwing shade not only him but his brother and friends, im tired of getting hurt and trying to work things out being the bigger person thinking about the future i admit i was wrong to not tell him, i know what i did was wrong i just don’t know what to do anymore