There’s a theological answer that has to do with prayer, the ministry of others in my life, and the unconditional love of God. But there’s also a sociological answer. It’s not separate from the work of God but rather an understanding of how the creator made us. Social scientist call it resilience. It’s the mental, emotional, and psychological ability to weather life's storms without long term consequences. There’s a great deal out there on the subject. Some of it too scientific and some too anecdotal.
I recommend Dr. Kenneth Ginsburg’s book, A Parent’s Guide to Building Resilience in Children and Teens: Giving Your Child Roots and Wings. It’s a great place to start.
Take Away: I experienced abuse of every category, moved over fifty times and lived through some awful situations but my life today does not reflect any of that.