Panic attacks and anxiety are pretty heavily influenced by sleep cycles and proper eating habits (I am medicated for anxiety, so I've done a fair bit of research on it). Your Panic attack may have been triggered by nothing more than a build up of sleep debt and not having regular well balanced meals.
Panic attacks are horrible, I'm glad your cousin could help you through this, and I hope your boss will be okay with the message you left.
I'm glad to hear you're feeling better now. Is there any way you could work a little less, to give yourself enough time to sleep and take care of yourself?
I know for me, a little sleep goes a LONG ways in managing my anxiety.