Food is the least important of your four basic needs. Mindful that the human body can easily go without food for thirty days and rescue typically comes in 24 hours, food is a key element of staying comfortable when lost but in the short term is not a critical piece.
The popular notion with food is similar to that of water which is to ration it if you have a limited supply. If your food supply is low you should eat what you have to keep yourself satisfied. Carbohydrate rich food throws fuel on the internal fires and helps keep you warm. Food also increases your ability to move around and stay focused.
If your have run out of food or do not have any food supply at all you do have a number of options. You should have an expert show you edible plants in the area you are hiking prior to departing.
As horrible as it may sound, worms, grubs, and insects are packed with protein and an excellent source of food if your situation becomes more critical over time. Generally, without specific gear it does become difficult to gather food. In one case a group of people in a plane crash used the parts of a watch to make fishing hooks and lures, and were actually successful at catching fish with a hand line.
Generally, if you have to move on, it is because a number of days have gone by without rescue. Preparation before the trip will serve as a tremendous aid in keeping the food issue a minor one while lost.
Summary of what to do when lost...