Demi Lovato's team tried to stage an intervention and get her help for her drug addiction, but the singer blew them off ... TMZ has learned.

Sources close to Demi tell us members of her team noticed she was in a bad place a few weeks ago, and even confronted her about it. We're told they offered assistance to get her back to sobriety. The plan was to urge her into a rehab program.

We're told the intervention attempt was not successful -- Demi refused and continued to party, instead. Other sources tell us she tried to make it seem like everything was okay, but her struggle became obvious shortly before Tuesday's overdose.

There's also this -- Lovato and her longtime manager, Phil McIntyre, parted ways a couple months ago. Although neither has said why they broke off their professional relationship ... we're told Phil had a hand in the intervention efforts.