Many things might be causing your dog to feel melancholy following surgery. Opioids or NSAIDS (non-steroidal anti-inflammatory medicines) used to treat pain during and after surgery may still be metabolizing in your dog.