Pop star Demi Lovato has revealed that she spent "years" struggling to understand her own mental health.