In practice, the answer is not long. You'd bleed to death pretty fast, or succumb to infection. But if you had a skilled surgeon and plenty of medical supplies, how long could you survive?
The Naked Scientists have figured it out. Obviously, just cutting or biting wouldn't allow you to live very long. If you had some kind of surgeon with you, and they managed to remove nonessential parts, you can survive for a relatively long time. The trick is to cut off all your limbs first. After that, you get into stuff that might kill you. According to a medical student at Addenbrookes Hospital:
To work out how much energy is available from this, we need to use something as a proxy, because little is known about the calorific value of human meat. In this case, we’ll use uncooked pork chops, which, according to a well known high-street supermarket, offer 213 calories per 100g. This means that our 32Kg of limbs could provide an impressive 68,000 calories. . . . Our 68,000 calories of human limb should keep our survivor going for around about 39 days, or hopefully long enough to be rescued.