Good idea from chigrandma - check out his gums. Either extremely red, or white gums are bad news meaning you need a vet NOW. Regardless of the gums, I still think you need a vet NOW. I've known some dogs who will behave that way when they have pain - it's like they're trying to run away from it. Until you rule out a physical problem, you can't diagnose a behaviorial issue so make that appointment! :-)
When a dog pants excessively and its not hot or stressed nervous...that is NOT a good sign at all for whatever reasons....theres something wrong... look at your dogs gums and tongue....are they red....if so...not a good sign...
It sounds like your dog is in heat if its a male.....
or,,,,,,your dog is in trouble and you need to get the dog to vet asap....could be cardiac...
Panting is not a good sign w/out cause....hot weather...or stressed about a storm coming or PAIN or CARDIAC....
Please get to vet or Emer Hosp...
I would take the dog back to the vet for more tests. I am not sure what it means, but if it abnormal behavior for your dog, something else is going on. Maybe it is an ear infection, but I would have it checked out again.