I am not an expert on depression or any other medical matters, but I would like to explain to you what has happened to you from an intuitive point of view.
You had an active life where you felt physically able to take care of yourself - probably better than most people. Then you made a life change (decided to get divorced) and your hip refused to co-operate in this life change. Your hip was a symptom of you not being quite ready to move forward with your life, despite what your mind told you.
When you needed medical intervention, you moved from being part of a relationship to being by yourself and relying only on yourself. In intuitive terms you moved from the sacral chakra (which indicates good relationships and feeling secure in yourself) to the base chakra (which is all about safety, basic survival needs and a focus on me, myself and I). In this sense it makes sense that you wanted your marriage back - not your wife, but the physical and emotional comfort of a known situation with a known person. This was not really an attempt to reconcile with your wife, but rather a means of reaching back to a life where you felt fully in control. .
Over time the energy flow in and around your body went back to where it was before your surgery, and you were no longer stuck in the behaviour of the base chakra.
You realized that making your marriage work again has never been an option and it is time to move forward - and this was expressed by your physical recovery as well.
You and your ex-wife both reached the end of the relationship, even if she made the decision. Now imagine how you would have felt by now if you stayed in the relationship - and then feel gratitude for how things have worked out for you.
And I am not saying your ex-wife is a bad person - she obviously has attributes going for her, but it appears that she tends to let her one-sided perceptions rule her life, without understanding the impact her behaviour has on other people.
It is typical for all people to move down to a previous level of development when they experience trauma, and as they grow out of the trauma they move up to their more recent level of development again.