the shame

I’m honestly just embarrassed and shameful because of the amount of times I tried to reach back out and shed all my emotions instead of just going no contact. I feel like I most definitely pushed him even farther away because of this. The last thing I sent him was my apologies, and although his response was nice and forgiving he told me he needs no contact especially during this phase of his life. I feel like I hurt him more without intending too. This is my first breakup and I think I acted more immature than I would have liked to instead of just accepting that things were over, I didn’t want to and still wanted to share my feelings with him, now i’m feeling humiliated. He definitely let his feelings get the best of him during the relationship so i know he’s not perfect in this regard either and everyone around me is telling me I dodged a bullet with him, but I can’t help but feel like I ruined any chances of being friends later on or even a chance for him to feel regret at all. I’m angry at how he treated me but i’m still feeling this shame. How do I deal with this embarrassment? How do i instead show myself some compassion?