Thanks for the question.
While I cannot diagnose your dog's condition via the internet I can tell you the following.
If medication is necessary for your dog then the best thing to do in this situation is to have your vet give you a prescription drug. Many vets would prescribe the likes of prozac or valium. But because of the legal restrictions you will have to see a vet who may want to examine your dog first to make sure your dog is not suffering from any condition which would contraindicate the prescription such as heart disease. That said prescription drugs from a vet are the most effective and safest way to go.
Many drugs sold over the counter as dog tranquilizers either do not work or are just not strong enough for your purpose but there are other over the counter options such as Melatonin which could also be effective and is used for dogs in your one's situation.
Here is some more information on Melatonin, this is an extract from an article I wrote on the subject which has been published elsewhere.
What is Melatonin? What is it used for in the dog? This article will cover dose rates for Melatonin, give you some basic information about Melatonin and also list some of it’s potential side effects.
1. Melatonin is a class of drug called a neuro-hormone, it has a number of potential veterinary uses such as sedative properties, may act as an anti-convulsant, and it can help regulate your dog’s body rhythms and reproductive cycles. But it also appears to have uses as an antioxidant which will combat free radicals which may be important in some disease conditions. This drug is available over the counter in a number of countries in the world but is not specifically licensed for animal use, that said many vets have found it to be of use in the following specific situations.
A. Melatonin has been used in the treatment of separation anxiety in dogs.
B. It is also used to treat other stressful conditions, such as noise anxieties related to fireworks etc.
C. Melatonin has been used to help sleep patterns in pets that are very active at night and not sleeping at the right time. This can sometimes occur in older dogs ( sundowner syndrome ) Basically it helps re-sets the animal’s biological clock.
D. It has been used to treat various other behavioral problems in dogs and it has sedative properties.
2. Dose rates for Melatonin in the dog : While this is an over the counter drug it is used in some complex situations, you would therefor be wise to get your vet involved rather than self treat on your own. That said for small dogs, Melatonin is given at up to 1 mg per dog three times a day orally. For medium sized dogs a dose of up to 3 mg per dog three times a day has been used orally. And in larger dogs consider a dose rate of up to 9 mg dog orally again given three times a day. The duration of the course would depend on the response to treatment and any side effects which may occur. This drug has often been safely used in dogs when given for long periods of time.
3. Side effects : This drug is generally considered to be safe and few side effects have been noted, but like any drug hypersensitivity reactions are possible in a very small number of individuals. Other side effects have been related to drug interaction with medications which the dog is already taking such as sedatives, steroids and monoamine oxidase inhibitors. With some individuals you may see excessive lethargy or paradoxically nervous behavior.
Melatonin is a drug which at the moment has fairly limited use in the veterinary field but as time goes on and we get to knowledge it may come into more extensive usage.
If I have not covered your question fully enough or you would like to ask more I will be online for the next hour or so and I will be at your disposal.