Start making plans to get clean permanently. Or start making peace with "jails, institutions, and death."
I've known quite a few people who couldn't control their drug use, and it's never pretty if they try to "continue in moderation" in any form. They've either continued to have negative consequences (some are dead), or they've gotten clean.
I never preach AA, but if you'll readily admit that you're powerless, than there ARE some people for whom complete abstinence is the only option.
Maybe try to stick to cannabis for the time being? Do you live in a medical state?