(CNN) -- His name is Valor. He's half Labrador retriever, half Great Dane, and goes everywhere with Sgt. Charles Hernandez. But Valor is more than a pet -- Hernandez considers the dog a personal physician.
When Hernandez was having seizures, Valor would nibble on the side of Hernandez's leg before the veteran realized anything was wrong. And the dog pulls him away from conflicts and jumps on him during anxiety attacks to calm him down. In combination with medications, Hernandez says the dog has helped his symptoms of post-traumatic stress disorder.
"I'm alive again," says Hernandez, 49, of the Bronx, New York, now retired from the U.S. National Guard. "What keeps me going is my dog."
A growing number of Americans are getting dogs for mental health needs, experts say. In the case of psychiatric service animals, such as Valor, they are trained specifically to help people with mental illnesses, in much the way seeing-eye dogs are taught to help to blind people.
PTSD in returning veterans is a major reason for the increasing demand for these dogs, said John Ensminger, a New York attorney and author of "Service and Therapy Dogs in American Society."
Unlike guide dogs for people with more obvious physical disabilities, there's a lot of gray area regarding who gets to have a dog accompany them to places -- from restaurants to stores to airplanes -- where animals are usually not allowed.
Why people get psychiatric service dogs
There's pretty good evidence that in some people, interacting with pets produces biochemical changes in the brain, says Hal Herzog, professor of psychology at Western Carolina University.
"In a way, we could all use a psychiatric service or therapy dog because of the incredible amount of stress that we're all under," says psychiatrist Dr. Carole Lieberman, author of "Coping With Terrorism: Dreams Interrupted."
Caring for a pet helps people become less frightened, more self-sufficient and secure. It takes the attention off their own fears, she said. Through owning a pet, you can "prove to yourself that you can take care of another living creature," she said. It "reassures you that you can take care of yourself."
Several categories of dogs that provide care to people with mental health issues have arisen, as the organization Heeling Allies describes:
The first is psychiatric service dogs, which is where Valor falls. These are individually, intensely trained dogs for people with mental disabilities. The Psychiatric Service Dog Society has extensive information about these dogs and how to get a dog trained. Heeling Allies calls them "mental health service dogs" because of the stigma associated with the term "psychiatric."
Then there are emotional support dogs, which provide comfort and motivation to people with disabilities. They may be taken on planes and live in housing situations where animals are not usually allowed, with proper documentation.
Finally, there are therapy dogs, which help a large group of people. For instance, Ensminger's dog Chloe is a therapy dog, and he voluntarily takes her to hospitals to comfort patients.
One of Lieberman's recent patients, for whom the psychiatrist wrote a letter to help a dog get certified, was a woman whose husband has a serious, progressive medical disorder, and she felt stretched to the limit taking care of him.
Her standard poodle "provided the emotional support when she was out of the house without her husband, that her husband used to provide," Lieberman said.
Another patient, also female, is undergoing stress because her home was put in foreclosure. She's also involved in a lawsuit and a countersuit regarding the potential loss of her multimillion-dollar property, Lieberman said.
The woman has to travel a lot because her children live across the country, and her mental state is such that sometimes she can't get out of bed. In this case, Lieberman compares the therapy dog to a baby blanket: evoking feelings of warmth and being taken care of. "It reminds her of when things were less traumatic," she said. "It's a tie to the past."
Hernandez joined the National Guard in 1996 and was one of the first responders at ground zero on September 11, 2001. He was deployed to Iraq from 2004 to 2006.
While in Iraq, Hernandez suffered a spinal cord injury that limited his ability to walk and a traumatic brain injury. Inside, he had changed, too. He became violent and agitated. And he had nightmares, uncomfortable thoughts and dreams.
"Not all wounds are visible," he said. "That's how I explain it to people."
Hernandez received a service dog in 2010 through Project HEAL, part of ECAD, an organization that trains and breeds assistance dogs. Project HEAL sets up veterans with PTSD with service dogs. Hernandez still volunteers with Project HEAL.
"He knows if something is wrong, and I can't figure it out," Hernandez said of Valor. "The dog has the extra Spider-Man sense." Hernandez still takes medication for PTSD.
Paul Aragon, a 29-year-old retired veteran, also has PTSD, but his only treatment is his service dog. Aragon got his service dog, Zoey, in October after his medication stopped working. Zoey "keeps me calm," he says.
Aragon, who studies motorcycle mechanics at Universal Technical Institute in Orlando, takes Zoey everywhere: dinner, movies, plane trips, even sometimes to school.
But not everyone recognizes the dogs as legitimate. Hernandez and Aragon have had incidents where people have questioned their bringing a dog into a public place. Hernandez even filed a lawsuit last year, alleging that he was kicked out of a fast-food restaurant because of his dog. It was later settled out of court.
The legal side
Part of the reason that psychiatric service dogs present a tricky situation is that different federal agencies implement different regulations with respect to them.
The Department of Justice, in its guidelines for implementing the Americans with Disabilities Act, defines "service animals" as "dogs that are individually trained to do work or perform tasks for people with disabilities." This can include "alerting and protecting a person who is having a seizure, reminding a person with mental illness to take prescribed medications, calming a person with Post Traumatic Stress Disorder (PTSD) during an anxiety attack, or performing other duties."
The guidelines state that dogs whose "sole function is to provide comfort or emotional support do not qualify as service animals under the ADA."
But service animals are required to be allowed in establishments that sell or prepare food, for example. And "allergies and fear of dogs are not valid reasons for denying access or refusing service to people using service animals," according to the guidelines.
In a situation such as a school classroom or a homeless shelter, the allergic person and the person with the service dog should be assigned to different locations if possible, the guidelines say.
The Department of Transportation, on the other hand, makes reference to animals that "assist persons with disabilities by providing emotional support." Its guidelines allow airlines to require documentation of a person's disability and say that the medical necessity of having the animal while traveling is understood.
The Department of Housing and Urban Development talks about assistance animals, which can include "providing emotional support to persons who have a disability related need for such support."
There's room for fraud and shady maneuvering here, Ensminger said. There have been cases where patients have written their own letters that psychiatrists have signed to recommend certifying a psychiatric dog. That's not how prescribing a treatment is supposed to work. There are also fake certification websites, Herzog said.
And it's not just a letter that turns a dog into a psychiatric service dog. There's a rigorous training procedure, and the whole process can cost as much as $38,000, Ensminger estimates.
Although some people try to train dogs themselves, this approach often fails because it takes a lot of expertise to choose the right dog, train it, and develop a relationship between a person and a service dog, said Darcie Boltz, executive director of Heeling Allies.
It takes a dog with a unique temperament to be properly suited for this work, and there can be animal welfare issues when improperly selected or trained dogs become mental health service dogs, Boltz said.
Although the system for psychiatric service dogs and emotional support animals can be abused, Lieberman says it's rare.
"If it isn't really important to you psychologically, there's so much hassle that you have to go through, you wouldn't necessarily ask for it," she said. "The solace of having your dog there to comfort you needs to be more important than the hassle you have to go through."
Lieberman recommends to her patients that dogs for mental health needs have some sort of identifying jacket so that there's less stigma and confusion around taking it to a place where animals usually aren't permitted.
The flip side
A bill passed by the Senate this month may restrict service dog access in the Veterans Affairs Department for people whose dogs did not come from accredited trainers, the Army Times reported.
Mental health support dogs also might lead to situations where people with the animals are on the same plane flight as people with severe pet allergies.
This is a problem for Sloane Miller, allergy advocate and life coach with severe asthma. She recalls that three years ago, she couldn't board her scheduled plane, or any other with the same airline to Florida that day, because emotional support animals were flying, too.
Miller supports service animals, but "it should be fair for everyone who has a need and a disability," she said. "There needs to be some kind of protection for my rights as well, to be able to travel in a safe environment."
And don't forget the animal's well-being, says Lori Marino, senior lecturer in psychology at Emory University. While it's a healthy path for some, there is concern that the animals themselves may be emotionally harmed. When dogs are paired with depressed and anxious people, the animals might become depressed and anxious, too.
Marino has worked with a homeless pet rescue, evaluating whether prospective pet owners are good matches for prospective dogs. Once in a while, a prospective owner will say, "I want this dog because I am depressed and need a pick-me-up," Marino said.
"I always decline that person. It's not fair to the dog to go to a home that's not emotionally healthy," she said. A dog "shouldn't be used as medicine."
But for people such as Hernandez and Aragon, dogs are medicine, a medicine that is keeping their PTSD in check. Hernandez has become a strong advocate for service dogs.
"The dog has taught me how to be humble, how to have stability, have to have patience," says Hernandez.
More from CNN Health: