Swiatek overcame frustration to cling on as her opponent served for the set, dominating a must-win tie-break to beat Croatia's Donna Vekic 4-6, 7-6(0), 6-2.
"I was just angry, wanted to change something, because clearly it wasn't working," the 25-year-old from Poland said on court.
"Sometimes if you care a bit less because you're... probably going to lose, it also helps you a bit," she later told reporters.
She will face American teenager Iva Jovic for a spot in the quarter-finals.
China's Zheng was tested by Marie Bouzkova, enduring her third three-setter of the tournament to beat the Czech player 7-6(3), 4-6, 7-5.
Zheng voiced frustration in each set at movement outside the court, including as she tried to salvage the second set on Bouzkova's serve.
But she pulled out some of her most accurate tennis to clinch the last two games and win the match when 27th-ranked Bouzkova fired long.
"I gave everything," said Zheng, who had already spent more than five hours on court in the first two rounds.
"Truthfully speaking, I felt a lot of pressure today," the 23-year-old told her home crowd, thanking fans for their support but commenting on distractions during play.
"Sometimes I'm a bit screaming in Chinese because I really see you guys are moving, but next match I hope I will be better on this," she said.
Zheng, the current world number 54, next plays 118th-ranked Alina Charaeva, who sent out top seed Elena Rybakina in the second round.
Third-seeded Coco Gauff dispatched Chinese teenager Sun Xinran 7-5, 6-1 to secure a meeting with Belgium's Elise Mertens in the round of 16.
"Today was really just about feeling," said the 22-year-old American, adding that it could be tough to play young players with styles largely unknown.
"I was just trying not to get frustrated out there," Gauff added, with a loud crowd behind the 16-year-old.
Wimbledon champion Linda Noskova also advanced and will face Ekaterina Alexandrova in the last 16, while Ukraine's Elina Svitolina will play American Ann Li.
