The 42-year-old musician married the singer-and-actress in 2009 after a year of dating and the 'Lucky Now' hitmaker found their life together in Los Angeles helped him ''really know'' himself because it was so different to his experiences in New York.
He said: ''The weirdest thing is that I would end up in that relationship but it was escaping the pain I felt from losing a person I had loved dearly ... and here was this very nice, kind person who lived on this other coast where the sun was shining and things were different.
''In a way, it was like an elixir. I almost felt like all that difference helped me get out of myself and shed who I thought I was, so I could get down into the depths of really knowing myself.''
Mandy filed for divorce in January 2015, and it later emerged they had split almost six months before then, but Ryan wants to be a ''gentleman'' and keep the reasons for the end of their marriage to himself.
He told Vanity Fair magazine: ''There's nothing for me to say about anything I went through outside of my art that would be helpful in a way I would be comfortable with.
''For me, the best thing you can do as a man in loving someone is to do your best, go on that walk, and at the end of that walk be as much of a gentleman as you were in the beginning.''
However, the 'Love is Hell' singer admits going through the divorce was a ''nightmare''.
Asked if it was a hellish process, he said: ''It was for me. But I know some people who've had decent ones that don't take a year, where people don't get screwed over.
''But everybody is different and I was already me.''
From 'Happy' to 'Banana Pancakes', these are soaked in positivity.