Rather than treat the mind, I believe in treating the spirit.
Yet, in a large amount of places, some form of gambling is indeed legal (usually heavily regulated of course, but legal nonetheless).
In several nations (or states), there's even a form of completely legal, state sponsored gambling (with often ridiculously lower odds compared to private gambling offerings).
The issue here is that the "treatment" might be worse than the "disease". The vast majority of narcotic users (and gamblers) actually are responsible in how they use the narcotic (play the game). And illegal drug (or gambling) enterprises are also associated with an uptick in crime. Such is why the original "Prohibition" (of alcohol in the US) failed in the first place.
It doesn't help that current governments often tend to treat even simple possession of certain narcotics as a fully-fledged crime. As opposed to not caring except in the case of addiction, where it is at that point a medical problem. (Even the United States' old alcohol prohibition did not outlaw possession or consumption.)