Post-partum depression is really common, and post-operative depression is not exactly unheard of. Surgery is hard on your body, and your body is in a direct feedback loop with your brain, and it's no surprise you feel awful.
That doesn't mean you're stuck feeling awful, though. Your OB should be able to refer you to a therapist.
You made a good decision, by the way, based on the information you had. You are a strong mother who chose to risk herself instead of her baby. Motherhood is not any one moment, it is all the moments put together. Your son is hardly going to remark his birth, but he feels your love every second, and he will for years.