Just a few months ago, Sue Smith considered herself a healthy eater. She ate salads with kale and quinoa. She counted calories. She eliminated processed sugar from her diet. She avoided dairy products.

But in the past month, as the coronavirus pandemic made her housebound, Ms. Smith, a writer in Los Angeles, began shopping — and eating — completely differently.

During a trip to the grocery store, she bought SpaghettiOs. She threw two large boxes of Goldfish crackers into her shopping cart. And she went all in on dairy.

“I’m eating ice cream. Ice cream bars,” Ms. Smith said. “And tonight, I’m making a spinach-artichoke lasagna. There’s so much dairy in it. But I just need the comfort that I get from that food right now.”