So sorry for what you’re going through. How do you know as a matter of fact, that the source of your anguish is the experience with your ex-wife? How do you know you’re not just making mental inferences about clinical depression?
Personally, I don’t ask or analyze “why” I feel this way; I focus on the “how” to fix. The problem with misdiagnosis of an emotional state, is that you inadvertently prescribe the wrong solution.