The carrying capacity of planet Earth is about 1 billion Humans (with lifestyles similar to the USA in 1999). There are over 7.6 billion people on the planet right now. We're in overshoot. Our current population is only possible because we are exploiting non-renewable energy sources. As they run out the population will crash and ultimately stabilise at an equilibrium level — a small fraction of what it is now.
At this point it really doesn't matter what you eat. The best thing you can do to sustain life on Earth is to avoid having children.
Trivia: Each Joule of energy you get from corn requires the same amount in oil to produce. Apples and chicken require about 7x as much oil as they yield in nutritional energy. Milk is ~2x. Pork is ~12x. Beef is ~23x.
The average US diet a few years ago required 9 Joules of fossil fuels for every 1 Joule of food consumed. It is tempting to use this as a mathematical basis for saying "the planet can support 11x as many vegetarians as is can normal people" — but that would be a mistake.
The depletion of non-renewable energy sources (oil, specifically) will force the Human species to find more economical food sources... but that won't lift the carrying capacity of the planet because solar panels displace photosynthesis.
Overshoot is overshoot. Unless someone manages to defy the laws of physics and invent Free and Unlimited Energy™ we're in for some rude shocks as the crude runs out.
tl;dr: The Earth cannot sustainably support the current population, regardless of what they eat. Switching from an omnivorous to a vegetarian diet won't change that. The Earth can, however, sustainably support about 1 billion people. When natural forces reduce our population back down to that level folks will have more pressing issues on their minds and no-one will care what people eat. Diet is not the problem — (over)population and extravagant (energy-demanding) lifestyles are.