I think you are (mis)remembering a scene from the 1967 novel These Savage Futurians by Philip E. High, though it's possible the novel was derived from a previous short story that I don't know about. Alternatively the anthology might have had an excerpt from the novel. Whatever the case, a scene from chapter six in the novel is almost identical to your description.
The protagonist is Robert Ventnor and the novel is set in a dystopian future after the collapse of society due to runaway consumerism. The scene you describe is when Ventnor is put in some form of virtual reality device so he can experience what it was like when society collapsed. The introduction to this scene is:
Stein waved to it. "Sit down, you are about to visit the past." He smiled as he attached sucker-terminals to Ventnor's wrists, his forehead and the back of his neck. "Do not be alarmed, you will not lose your identity. You will merely observe a period of history through another's eyes and another's faculties. You will become, for a brief period, a character we call Mr. Smith."
Ventnor finds himself in his house with no food. In desperation he suddenly thinks:
Synthetic food! The hypno-tutor! The four words seemed to come together in his mind in a kind of mental explosion. He'd collected hypno-tapes with the same enthusiasm some people collected books. His den was crammed with them. He almost ran to his room and began to thumb desperately through the list of titles. Yes, yes, he knew he had one. " The simple chemistry of synthetic foodstuffs." He almost jammed the tape into the tutor, placed the helmet on his head and switched on. God, yes, he'd make his own food, there were plenty of chemicals around, not to mention his ten-year-old son's chemistry set and all those bottles of stuff he'd brought when he'd dabbled in home-plastic-do-it-yourself jobs.
And he succeeds in making:
Within an hour he had a saucepan full of colorless rather repellent substance which, however, gave off a considerable amount of steam. Smith tasted it cautiously - not bad but a bit tasteless, could do with a little salt maybe. With a total disregard for his own basic chemistry, Smith added a considerable amount of sodium chloride to his concoction.
But:
He was about to ladle his dangerous meal into a soup plate when the doorbell rang. Smith/Ventnor swore under his breath and went to the door. "What in the name of hell are you playing at?" The policeman who asked the question was not a harsh man but he, too was hungry and, with the ever present threat of riots, his nerves were over-strained. "What-?" Smith stared at him blankly. "Don't play it stupid with me." The policeman grasped him by the lapels of his coat and jerked him forward. "A lot of people smelt cooking, a lot of hungry people. There's a mob forming and it's turning ugly. I've had to draft in a whole squad to keep order. They're saying you're a hoarder, an industrialist and God-knows-what."
Then the next time he makes the synthetic soup:
Smith made himself some more synthetic food. This time, to him, the odor was less savory and it required considerable effort to force the substance down his throat. Just as he was finishing, the window behind which he was eating, bulged inwards and twanged back into place. The heavy stone was flung back dangerously at the man who had thrown it. Suddenly cold, Smith saw that an angry mob was gathered outside the house. Damn! He had forgotten to draw the curtains again. He picked up the home-made gun, went to the door and opened it a crack. "Get away from here. I'm not doing you any harm." They shouted: "Hoarder," and "Industrialist," at him and a big man with an unshaven face shook his fist.
The chemical soup does cause changes in Ventnor, though these aren't described in detail.
He first notices blue pimples on his hands, then when eventually the mob break into his house they see:
The mob leaders looked at the distended body, the grotesquely swollen hands, the blue balloon-face and backed hastily away. Once they called his name hoarsely, then they turned and ran ...