Zhao made breaks of 55, 65, 60, 86 and 73 and fought back from 63-0 down to win the third frame on the black on his way to victory. The winner of that match will play Allen in the next round.
The 2022 UK Championship winner has spoken about a hard few months. In October he said he had spent 10 weeks in a mental health clinic before discharging himself.
Allen beat Yuan on his return to snooker and said there was still a long way to go in his recovery.
"I'm not going to lie, I nearly ended up back in the clinic at the weekend so it was not good,"Allen said on BBC Two after his victory over Yuan.
He said he was in a better place than he had been months earlier, while stressing that the work was not finished."I'm here and in a better place than I was a few months back, but there's a long way to go in my recovery,"Allen said.
On Tuesday, Allen said he was not sure if he would retire from the sport, but felt he was in a happier place.
After a defeat, Allen said in an emotional interview on TNT Sports that he expected to quit the sport.
He described recent contact with people who had treated him."I spoke to some of the therapists last week and I thought 'this is where I belong',"Allen said.