For me, that only stopped very recently (the last week or so), after i spent about 3 months "not dieting"--just allowing myself to eat whatever i want. I know that's probably not the answer you're looking for, but that's the only way i was able to stop my food obsession. Now, i actually sometimes WISH i had something to look forward to, since food doesn't inspire me anymore...so sometimes i may just experience a bit of boredom, since i'm not thinking about food anymore. Which i think is awesome.
Trying Intuitive Eating! Want to be happier and have a healthy relationship with food