For more than 10 years, Gwen Stefani was married to Gavin Rossdale, but when their relationship came to an end in 2015, Stefani was “embarrassed” and didn’t want to feel like a “failure.”

Following her divorce from Rossdale, Stefani found a friend and “unexpected gift” in boyfriend and fellow “The Voice” judge, Blake Shelton. “He was a friend to me when I needed a friend,” Stefani told Glamour in a new interview for its “Women of the Year” special. “And that became an inspiration in the songwriting… I’ve learned a lot about country music from him.”

The couple began to bond during Season 9 of NBC’s “The Voice,” following Stefani’s split and Shelton’s divorce from Miranda Lambert. While their musical backgrounds may be different, they also share some similarities. “It’s definitely two different cultures but there are many similarities, in things that we love and our ­morals. But it’s really fun when you can learn about so many new things and share those differences.”

It appears that Shelton came into Stefani’s life at just the right moment, since her divorce from Rossdale was starting to take a toll on her. While Stefani didn’t mind what people were saying about her, marriage was the one thing she didn’t want to fail at.

“I don’t think you’ll talk to one person who didn’t make it in a marriage who’s not gonna feel that way,” Stefani said. “The intention of being married is the vow, right? You want to put everything into it to make it a success. And all I had to look at was the huge success of my parents: They just had their 50th anniversary.”

According to Stefani, her marriage with Rossdale was “extra hard” and she had to work “really hard” at making it succeed. Luckily for the singer, she says she is in a different place now. “I’m in such a new place. It’s all about the future for me.”

While Shelton came into Stefani’s life at the right time, she also came into his at a good time. In a July interview with Billboard, the country star said Stefani saved his life. “Who else on earth could understand going through a high-profile divorce from another musician? You can’t even imagine the similarities in our divorces.”