This is a rather long, but through answer, so bear with me in reading it carefully.
The difference between an emotional support Animal and a Service Animal is as follows: A service animal is trained to do one or more specific service tasks that mediate a disability. An Emotional service animal is not trained to do specific tasks- rather ESAs do nothing more than regular "dog" stuff. Both however are trained on "how to behave themselves in public" which are known in the lingo as "Public Access Skills". Showing affection to the handler and other "regular dog" stuff is notably not a service task under the meaning of the ADA. (The Americans With Disabilities Act). The major difference of consequence between the two is of course Service Dogs are protected by federal law (meaning you can sue if someone doesn't allow a service dog under most but not all circumstances), where as ESAs don't have protection of federal law and only have protection under few state laws.
Therefore, in some cases of PTSD an animal can be a service animal. For example if the animal fetches medication, applies pressure to an individual to "move" them away from a PTSD trigger and out of harms way, "clears" the handler's apartment to make the handler less afraid of entering, etc. it becomes a service animal under ADA. However, If the dog merely provides physical comfort in the same manner that other animals would provide without unusual or specialized training (i.e. licking, etc.), it is an ESA.
If you have a PTSD and your specific symptoms can be partially or completely alleviated by a service animals service task, you would then qualify under ADA for a service dog. There is no "formal certification" for a service dog under the ADA (in fact the supreme court of the United States has interpreted that the law says you can train the dog yourself) and the ADA likewise does not require a doctor to "prescribe" a service animal either. Also, state laws must be interpreted to be consistent with the ADA. (while the states can grant more rights than the ADA, they can't "take away" from the protections granted by the ADA under a legal doctrine known as "federal preemption" and the supremacy clause of the United States Constitution.)
Notably, places like schools, stores, ect. may only legally ask you two questions to determine whether or not the dog is covered by ADA: the first question is "Is the dog trained to do a service task" and the second is "Does the service task mitigate a disability". It is illegal under ADA to ask what disability you have, to ask you to "demonstrate" the service dog's skill, or other similar questions.