In a match suspended from Monday night due to darkness with the Argentine star two sets to one ahead, Del Potro sealed victory on a fifth match point after nearly four and a half hours of action on Court Two.
But he persevered through dark times and is rewarded with his second successive Slam quarter-final - the first time he has done that since reaching the last eight at the Australian Open and Roland Garros in 2012.
Three-time champion Novak Djokovic, seeded a lowly 12 this year, can make his 10th Wimbledon quarterfinal if he defeats unseeded Karen Khachanov, the world No. 40 from Russian Federation.
Meanwhile, Federer will start at 1pm on Court 1 and will face the victor of Raonic and Isner in the semi-finals.
The 32-year-old Spaniard is the top-ranked player in the world and just won his record-extending 11th French Open.
The world number one, chasing an 18th major, will now take on Del Potro boasting a 10-5 career lead. "That's the thing. I can be here, I can't come here and say, 'no, of course I want to play against the best players'". He has been making records every Grand Slam.
Rafael Nadal is in the quarterfinals at Wimbledon for the first time since 2011. Kerber was the runner-up at the All England Club in 2016, while 14th-seeded Kasatkina is in the last eight for the first time.
Is there anything Roger Federer can't do?
Rather than simply guiding the bouncing ball away and towards one of the ball kids, Federer thought it would be a good opportunity to provide some bonus entertainment for his adoring fans at Wimbledon.
[BREAKING] Croatia Vs Denmark enters penalty shoot-out
Eriksen then played an astute pass into the path of Braithwaite, who steered it goalwards from an angle but saw Subasic block. We're back for the second half, will we see as explosive a start as we did in the first? 45' (+2) - First half ends.
"Ratings for @rogerfederer's forward defence, @ICC?", Wimbledon wrote in a tweet with a video of the defensive shot.
"It was great to win that first set so quickly", the eight-time champion said after booking a last-eight date with either South African eighth seed Kevin Anderson or resurgent Frenchman Gael Monfils.
Djokovic may have lost the Queen's final to Marin Cilic, but his display was an announcement to the world of tennis that this is a man ready to fight on the big stage once more.
The 21-year-old Ostapenko, the youngest player remaining in the women's draw, next faces 33rd-ranked Dominika Cibulkova of Slovakia.
It was very dark when they finished.
But there was no stopping the Serb once he made it on to Court One as he romped to a 6-4, 6-2, 6-2 win to reach the quarter-finals for a 10th time.
Raonic has the greater experience at Wimbledon, however, reaching at least the last eight in four of his past five appearances here - including a run to the 2016 final where he was beaten by home favourite Andy Murray.
Argentina's Juan Martin Del Potro in action during the fourth round match against France's Gilles Simon.