I've had a couple of operations, not including my upcoming WLS next week, and always find myself a bit out of sorts for at least a week after surgery. Here's what I attribute the depression to:
a. You've just had surgery--your body has been through a huge workout, so to speak. You've had medications, been put under, have had pain meds, blood thinners, etc.
b. The whole ordeal is stressful: hospitals, machines, monitors, etc.
c. You are in pain or discomfort.
d. Your daily routine is out of whack.
e. You may need help with things.
f. You don't feel like yourself.
...and a lot of other immediate changes.
If you think about it, it all makes sense that you would be a little depressed, or at least a little emotional. I know I'm always a little down in the dumps after a procedure..and it's probably normal.