I actually think I can assist a little. That sounds remarkably like a panic attack and they are completely normal things and usually can be managed with a lot of different methods. A few of the others have those from time to time. It's very good that you found a method that seemed to work for you right now, but I think if this keeps happening, you will want to bring it up with some kind of psychologist or therapist.
They are usually much better at helping you find out what works for you. With my friend who is still here, that tends to be a combination medication and finding one or more of a few people who know what to do to help. He tends to prefer being touched, and reminded that he is somewhere safe, but our other friend tended to do breathing exercises and...it really does change depending on the person in question.
It IS good to hear that you are all right now. So helping your daughter seems to have helped you. Maybe the soothing helped to calm you down, or depending on where you are from...could she have some sort of gift for that sort of thing?
Really, as a once almost doctor, I would say talking to someone is a good idea for starters if you can or think you need to. But it IS perfectly normal and all right. Remember that.