Vet absolutely ..... But in the mean time how about some more details
What kind of dog is he??? How big ?? general weight idea .... and is he in shape , fat , lean sudden weight gain or loss???
You have had him a long time, how long? did you get him as a pup? from where?
Flea tick heartworm meds ???
Nuetered, altered ??
Have you moved, started a new job, school dumped a boyfriend, wife???
Have you added any new pets or kids to the family??
Are his eyes clear? Does he have a film on them?
Coat....long , short, allergies, patchy , dry , oily???
Any change in diet? What are you feeding??
Some of these seem kind of simple other seem rather silly but all of them have a real realson behind them that could be affecting your dog's feelings....
If he has developed vision issues the world can become a scary place. Sudden weight gain or loss is always significant. Diet, think about it who knew before the Chinese dog food killed so many dogs that entire lines of normally decent food can be problem ??
If you have changed the environment, moves, away from what he depended on or some one has moved out and you are sad and low all of these things can impact your dog.
If you got him as a pup you may have a total picture of what affects him, if not then there may be some history you did not now about that is now surfacing.
Give some details and we can kick it around a bit as you are waiting for your vet appointment...
Bonita of Bwana