I feel like a coward

This evening, I went to the store with my pregnant wife and ran into someone I used to know and didn’t end on the best of terms with, suddenly I found myself filled with extreme panic and fear as we both noticed each other, feeling my heart pounding out of my chest. I told my wife we are leaving now and to start checking out our items in the line, understandably my wife was confused as to what was going on as I’m standing there literally shaking like a leaf fumbling around my wallet barely able to use the pin pad to pay for the items. I ended up driving us to the grocery store across the street to buy her orange juice that she was craving. I am 31 years old with a pregnant wife and child on the way sitting here feeling like a fucking failure and coward. I am so ashamed of myself feeling like my wife deserves better or maybe that a different man would have been brave and not been scared. I don’t ever want my child to see me like this in the future. I have been a life long anxiety and panic sufferer since the age of 11. Anyone else ever deal with something similar? How did you overcome it? Thank you for taking the time to read.