Step1
Naturally, the first thing to do is admit you have a problem and may well be addicted. I won't go into detail here, because this is for people who have already admitted their problem to themselves.
Step2
The most advisable thing to do is to remove as many drugs as you can from your home, even if they're legal. This includes ALL drugs, except prescription ones. If you are addicted to a prescription drug, consult your Doctor about alternative medications that will have the same medical purpose you originally used them for.
Step3
Every morning when you wake up, say to yourself (either aloud or in your head): "I won't take any drugs today.". Say it atleast three times. This helps you to tell your brain you don't want to take the drug, and over-time makes it easier to resist the urges. Likewise, at the end of every day you resisted the desire to take drugs, say to yourself "Today was a good day. No matter what happened, it was good because I didn't take those drugs." This helps you to maintain a positive attitude.
Step4
Try to substitute your drugs for vitamin tablets or such. Although this won't help you with the urge to take your drug of choice, the action of actually taking something may help you with the desire to actually take a tablet, as opposed to experience it's effect.
Step5
Get yourself an elastic band. You can usually buy them in supermarkets, newsagents or similar. Alternatively, you can use one off a purchased product - just make sure it isn't too big or too small. Put the elastic band on your wrist, so that it's comfortable. Keep it on at all times. Whenever you feel an urge or a desire to take a drug, snap the elastic band against your wrist. Just like your addiction, this is a psychological thing - the action of snapping the band not only gives you something to do, but also gives you something negative to associate with the urges, helping you resist them.
Step6
Whenever you feel you want to take a drug, just stop for a moment. Close your eyes, take a few deep breaths. This gives you time to think carefully about what you're doing. Tell yourself you don't want to take the drug, remind yourself why you must stop. Say it aloud to yourself.
Step7
Similarly, whenever you feel you want to take a drug, stop for a moment. Count to 10 either aloud or in your head. This also gives you time you think about what you're doing. Remind yourself why you must stop taking the drug, say it aloud to yourself. You can combine this with Step 3, so that you take 10 deep breaths or such.
Step8
Let atleast one trusted person know about your addiction if you haven't already. Tell them that you're probably going to be depressed a lot in the near future, and that you could use someone to be with you and cheer you up when it's bad enough. Alternatively, find out about a counselling service - someone you can talk to once a week or fortnight, or even more often. They don't need to help you with the addiction, just be someone for you to talk to. The Samaritans or similar could also be useful.
Step9
Meditate only a daily basis. This doesn't have to be a massively complex Druidic ritual - simply sitting down for ten minutes each day, closing your eyes and breathing deeply can make a surprising difference.
Step10
Finally, experiment with your own ideas. Look for other articles and advice on psychological addiction (and physical if your drug of choice has physical side effects). If you feel it would help, join a self help group like Narcotics Anonymous or Recoveries Anomnyous. Above all, remain optimistic about your recovery.