EXCLUSIVE

DMX is getting help at a rehab facility ... TMZ has learned ... on the heels of postponing concert dates.

Sources connected with DMX tell us he checked himself in Thursday night at a treatment center in Southern California. We're told X went voluntarily, but his manager, Pat Gallo, and ex-wife, Tashera Simmons, had encouraged the move.

The rapper has been to rehab before while battling substance abuse issues for years.

As we first reported, X had to cancel 3 shows this week due to what his rep called a "medical emergency." We're told he flew to Cali to get help because he felt he was "moving to a dark place" and wanted to make sure he stayed on the right path.

Sources at DMX's show in Brooklyn last week tell us he was drinking heavily beforehand.

In a statement, Gallo apologized to X's fans for the postponed shows, and says, "It is important right now that he take some time off to focus on his health so that he can be a better father, friend and entertainer."