Lovato tweeted on Tuesday: "Weakness is living in denial. Only the strongest people ask for help."
According to TMZ.com, Gomez was treated for a problem with alcohol, marijuana and prescription drug Ambien.
The singer's representative confirmed she spent time at Arizona's Dawn at the Meadows last month, but denied she had substance abuse problems. It's been reported she was concentrating on her "emotional life" due to her on-again, off-again relationship with Justin Bieber.
An insider told E! News: "She needed to work on her emotional life. She needed to learn tools on how to deal with Justin and letting go of that relationship. This is the first time she's ever taken the time to deal with issues, to deal with herself, with a therapist."
Lovato, 21, went to rehab in December 2010 for help with an eating disorder, self-harm and depression. She later revealed that she also battled serious drug and alcohol dependency issues.
Gomez and Lovato met as children while on the set of "Barney & Friends." They recently reconnected after growing apart during Lovato's troubled period.