I'm sorry to hear your daughter is experiencing this! It sounds as though she is genuinely frightened, and that's always stressful for you as the parent, too.
I think you're right on to wonder about both physical and psychological causes. I experienced a panic attack as a teenager, and have also struggled with generalized anxiety, so I think that's certainly a possibility (especially given her tendency to be a bit of a hypochondriac, and the timing right after getting into trouble). Still, I would start with a thorough physical with her regular doctor, and then seek a referral for a psychologist if no physical problems are detected.
In the meantime, you might seek out some resources for dealing with anxiety to help her find some ways to cope when she is feeling stressed or overwhelmed. Hope things improve soon!