Federer on Monday suffered a stunning upset at the hands of Spanish 19th seed Tommy Robredo, whose 7-6 (7/3), 6-3, 6-4 shocker was his first victory in 11 matches against the 17-time Grand Slam champion and five-time US Open winner.
"I'm going to feel like I beat myself," Federer said.
"It was up to me to make the difference and I just couldn't," he said.
"I self-destructed, which is really disappointing.
"When things came to the crunch I just couldn't do it. It's frustrating."
Federer's failure, which came on the heels of a shock second-round Wimbledon exit, thwarted a potential quarter-final match with 12-time Grand Slam winner Nadal in what would have been their first meeting on the New York hardcourts.
"If I'm playing like this, I'm not going to beat Rafa," Federer said.
This was the first year since 2002 that Federer has not made a Grand Slam final.
Instead, it will be Robredo in his first US Open quarter-final against second-seeded countryman Nadal, who dispatched Germany's 22nd-seeded Philipp Kohlschreiber 6-7 (4/7), 6-4, 6-3, 6-1.
"It was very tough conditions, very humid. I sweat too much," Nadal said.
"But the opponent was great," he said.
"Lucky to be through I think — I fought a lot to get through this match."
Nadal leads the ATP with nine titles this season and a 56-3 record since ending a seven-month injury layoff last February, his sore knees having kept him out of last year's US Open.
Nadal has won all six career meetings with Robredo, but Federer was 10-0 against Robredo before being sent home.
"He will come to my match with big confidence," Nadal said.
"I hope to be ready for that."
Robredo suffered seven prior fourth-round US Open defeats and matched his best Grand Slam performance with the dramatic upset.
"To beat Roger, it's something amazing," Robredo said.
"It's like a dream," he said.