I've fasted for several days before for reasons unrelated to suicide. I haven't attempted using it, but it seems like it would be unlikely to be successful. If you collapsed in public or anyone noticed what you were doing, you'd probably be intubated/force fed. You'd almost certainly be caught doing it too because it takes such a long time, unless you're able to do what the guy mentioned in one of the above posts did and vanish off into the woods somewhere.
Of course, that's all assuming you managed to override the survival instinct and actually start to starve yourself. Unfortunately for us, the human body has a knack for keeping itself alive. I'd imagine that restricting food for suicide would have the same effect as trying to hold your breath to kill yourself: your body would force you to take in what it needs to stay alive. It's nearly impossible to override the natural instincts related to breathing, eating, drinking and sleeping long enough to kill yourself without using external devices (such as rope to stop breathing).
The only way I could see it being successful is if you went out somewhere isolated without access to food and without an easy way to return home. Maybe if you came up with a good excuse to not be disturbed for several weeks, hiked out to a spot a long way from anywhere, and made sure you didn't have a way to call for help, you could be successful. You would probably become too weak to hike back after a few days if you went out far enough. I suppose if you were worried about the chance that you'd panic and find the strength to hike back home, you could drive out somewhere too far to walk and use up all your fuel in the process.
Either way, you'd have to make sure you were trapped there undisturbed for at least a month and that you absolutely couldn't find food. It could take even longer if you're significantly overweight. It would be a hellish way to go, and there's so many areas it could go wrong. If you were found close to death, you'd be forced to endure refeeding syndrome and possibly organ damage too.
The human body can survive for a long time on surprisingly little food. There's records of people surviving months without eating. Even in cases of severe anorexia where the person winds up losing to their illness, they're often unwell for a decade or so before the multi-organ damage caused by chronic starvation gets to them.
I wouldn't risk it if I were you.
Edit: The case of the hiker known as "Mostly Harmless" comes to mind. He was found starved in a tent - exactly how he got to that point is unknown, but it may have been related to mental illness or a suicide. There's not really much to take from that story, I'm just making mental links.