My partner and I have been living together for over 4 years. She works remotely and we live outside of the city. We're both introverts and expats, so we don't have many friends. 

She's had anxiety and panic before, but stopped for almost a year ago. 

Now She's having panic attacks for the last 3/4 days. It's usually in the morning and I have sleeping problems, so I'm usually finally asleep when she wakes up. I'm never there to see them.

But today I couldn't sleep and about 20 minutes after she woke up, I heard crying and false breathing in the office, found her on the floor, she was punching the floor, breathing intensively, then she would stop breathing, moving around, eyes closed... it was very hard to see it.

I told her that everything is OK, it's Sunday and that she should be grateful for the life that we have. I think she stresses from work, maybe because I don't work and have been struggling with my depression and sleeping problems, I don't know how to help her. 

When she finally started looking at the ceiling and breathing ok, I left, I was having a stomach ache. Did I do well?

When I went back to her, about 30 minutes later, she moved to the bed and was listening to some guided meditation, I gave her light pets and laid in bed with her, but at some point she just seemed to become really tense, telling me that she knows I'm always tired and want to play videogames. She just left the bed and the room. 

I don't know what to do. Should I keep distance? Should I hug her? Am I the problem? What should I say? And was it OK that I left her there?