Well, I think this question's been answered in abundance, huh?
Psychological addiction is a problematic concept in my opinion. It's not strictly the drug itself that produces the addiction, unlike physical addiction in which one is trying to evade physical withdrawal symptoms. There's something else about the person (e.g. stress factors, an "addictive personality", etc. etc.) that causes the drug to become an accessory to their escape from their problems. Anything that provides a distraction can fulfill this role, but obviously the more pleasant and complete the distraction is, the more likely it is that the addicted individual will resort to it as an escape.
The important thing to stress here is that it is indeed an escape. If you recognize this, you can steer yourself away from fretting about how to avoid taking Ecstasy and concentrate instead on the factors that are pushing you to take it in the first place. I'm not trying to be patronizing here (although perhaps that's unavoidable), but I think it's helpful to think about what Ecstasy gives you and whether you can achieve those things on your own, without the use of the drug. Once you've mastered your need for it, you can eventually return to using it in a recreational rather than a desperate sense.
Hope that helps and that you don't feel like I'm lecturing you.

All the best.
(
NOTE: this is of course assuming that the person isn't self-medicating for a possible chemical imbalance. If you are, it's probably much more effective to either discipline yourself to tolerate it without the use of chemicals -- difficult to impossible in some cases -- or use a chemical to adjust for it that's not as harmful in the long term as MDMA. Either way, putting yourself in control of the problem will be much more beneficial in the long term than caving in to your cravings, in my opinion.)