That would depend on how the panic attacks affect the person's ability to perform major life activities. Service dogs don't come off the shelf based on diagnosis, but are individually trained for specific needs.
In order to qualify, it must be a condition severe enough to qualify as a disability. Most people with a mental disorder (including panic attacks) will not be disabled by their condition. Approximately one in four are. They are disabled when the condition has a significant impact on a person's ability to perform major life activities, such as seeing, hearing, breathing, thinking, learning, walking or using their hands.
Whichever major life activities are substantially limited by the condition are what the dog is trained to mitigate. So if a person can't see because of their condition, the dog might be trained to guide them around obstacles. If the person can't hear, the dog can be trained to signal for certain sounds, and so on.
What a service dog for a person disabled by mental illness is trained to do is as individual as the person themselves.
Please note that, "Animals whose sole function is to provide emotional support, comfort, therapy, companionship, therapeutic benefits, or to promote emotional well-being are not service animals." (from the U.S. Department of Justice, which administers the ADA). So being there to comfort the person would not qualify a dog as a service dog. The dog must be trained to actually do something the person cannot do for themselves.
I'm a service dog trainer.