Ideally, you should speak to your psychiatrist about it. The surgeon is not going to be as well versed as a dr specializing in psychotropic medications.
That being said, one of the requirements for myself was psychiatric clearance before I was approved for bypass surgery. This topic should definitely come up as suggested earlier.
After the surgery, the medications I took were pulverized into powder to aid in absorption. In theory, I was supposed to continue to grind my medication for months after surgery. I got sick of doing that after a few weeks and found that the stomach could digest the pills just fine. (Definately not suggesting that anybody should be as careless as I.)