World number one Federer will face Czech sixth seed Tomas Berdych in what will be his 38th Grand Slam quarter-final.
"I am really sorry for Mardy. I just want to wish him a speedy recovery. We all want to see him back on tour soon," said Federer.
On his quarter-final opponent, he added: "It will be a tough match against Tomas. We have played many times in the past and he has always been a tough opponent. I will have to continue to serve well and dictate the points."
Fish, 30, missed two months of the season earlier this year because of a heart problem.
He was hospitalized after the Miami Masters in March when his heart rate increased to three times its normal resting rate.
The American then underwent a procedure called a cardiac catheter ablation in Los Angeles on May 23rd to correct faulty wiring in his heart.
"I regret that I have to withdraw from the US Open for precautionary measures," Fish said. "I was reluctant to do so, but am following medical
"I had a good summer and look forward to resuming my tournament schedule in the fall."
Fish did not specify his reason for health concerns, but US doubles standout Mike Bryan said that Fish "didn't look right" when he walked into the
"Nobody really knows much," Bryan said. "I heard (his heart rhythm issue) was backing up on him in his last match and he stayed until really late in the morning to get treatment."