<human>: I (25M) moved abroad for a year, and I'm about to return home. My ex (27F) crushed me shortly after I left, and I still haven't fully recovered. I haven't spoken to her in the past six months, which has helped significantly; and while I do not want her back, I am still far from completely over this.

After the breakup, it was very hard to lean on my friends for support, due to the massive time difference and physically being elsewhere. To make matters worse, my ex continued to spend time with them. 

When I go back home in a month, I don't want her to be in my life at all, but it's not fair for me to ask my friends to stop spending time with her. I feel like it's inevitable that my ex and I will randomly meet due to this, and I am dreading it. I don't want to cause problems, and I wish her well, but I don't want to have to further distance myself from my friends in an attempt to keep her (and her current bf) out of my life.

How do I cope with this when I go home?

Can you give me a shortened version of the text?
<bot>: returning home next month, ex is friends with all of my closest friends; how do i "get them back" while keeping my ex out of my life?