I know for me when that heart racing overwhelming feeling came about me it was because I was in areas where the potential to run into my ex was possible. The only think I came to understand while feeling like that was in being very unsure of how I would actually react or what I might actually say if faced with that situation.
I stopped going to places where the potential to run into him was present. I also stopped going to certain places that we both liked going to together. I think those were triggers for me in the beginning after ending things. The more time that passed where I did not run into him the better I felt. And eventually going to those places where the potential to run into him was no longer triggering.