Hi,
Panic attacks are really scary. I had them before I began drinking and I still get them occasionally. When I was drinking, I had a lot of panic attacks.
You talked about your breathing becoming shallow. That's so significant. The shallow breathing perpetuates the panic attack, so by simply taking three deep "belly breaths" you would likely find that you feel more calm. Sitting down and waiting till it passed was a good idea.
One thing I would mention is that balance is a key for me. If you were hungry, already feeling 'off' and knowing you needed to do things at home, it was probably enough to allow the anxiety/panic to overwhelm you.