In March 2012 MTV aired a documentary (Stay Strong) about Lovato's rehab and recovery, and she began work on her fourth album the following month. In May she became a judge for the second season of the American version of The X Factor, with a reported salary of one million dollars. Joining Britney Spears, Simon Cowell and L.A. Reid, it was speculated that she was chosen to attract a younger audience. Mentoring the Young Adults category, her final act (CeCe Frey) finished sixth. At the Minnesota State Fair in August, Lovato announced that after a pre-show performance at the 2012 MTV Video Music Awards she would release a single by December.
On December 24, she released a video on her YouTube account of herself singing "Angels Among Us" dedicated to the victims of the Sandy Hook Elementary School shooting. In January 2013, it was reported that Lovato had been living in a sober-living facility in Los Angeles for more than a year because she felt it was the best way to avoid returning to her addictions and eating disorder.