"You have to keep pressing. You have to keep digging deep," Hamels said.
Hamels improved to 4-2 with a 2.25 ERA in his 11 starts since June 26. He ranks ninth out of 97 pitchers in baseball in ERA in that two-month stretch. He ranked 77th out of 95 qualifying pitchers through June 26 with a 4.58 ERA.
Hamels spent much of the first few innings on Wednesday watching Mets right-hander Daisuke Matsuzaka pitch at a snail's pace. Matsuzaka slowed the game to a nearly insufferable tempo, typically taking 25 seconds or more between pitches.
It reminded Jimmy Rollins of former big league pitcher Steve Trachsel, who also worked slowly.
"It was hard to stay focused," Carlos Ruiz said. "It was hard to wait that long. I was like, 'Wow.' It was a long day."
According to Fangraphs, Dice-K has averaged 25.3 seconds between pitches from 2007-13, making him the second-slowest starting pitcher in baseball behind Josh Beckett, who has averaged 25.5 seconds between pitches in that span.
Perhaps Dice-K lulled the Phillies to sleep.
He loaded the bases with one out in the second, but struck out Hamels and Roger Bernadina to end the inning. He loaded the bases again with one out in the third, but struck out Cody Asche and got John Mayberry Jr. to pop up to catcher Travis d'Arnaud.
"It's hard for a hitter to not only have timing, but to feel aggressive," Phillies interim manager Ryne Sandberg said. "And then there were long counts. I think he had  pitches through two or three. All the pitches being thrown is the other side of it. The long delays and waiting for a pitch to hit, it all seems to be a part of his effectiveness."
The Mets scored a run in the third to take a 1-0 lead, but the Phillies finally broke through in the fourth when Pete Orr singled, advanced to second on a sacrifice bunt from Hamels and scored on a double to left-center by Rollins.
The Phillies finally knocked Dice-K from the game in the fifth, when they scored three runs to take a 4-1 lead. Ruiz singled and Michael Young hit a ground-rule double to put runners on second and third with one out. Asche walked to load the bases and Dice-K hit Mayberry to score Ruiz to hand the Phillies a 2-1 lead.
Mets manager Terry Collins mercifully pulled Dice-K from the game at that point.
"Today's game was pretty self-explanatory, I think," Matsuzaka said. "I was all over the place today, all over the zone. I wasn't able to throw the ball where d'Arnaud wanted me to throw it."
Two batters later, Hamels singled to left field against Mets left-hander Robert Carson to make it 4-1.
Ruiz homered in the sixth to make it 5-1.
Hamels took care of the rest, even though it wasn't easy.
"It's a lot of self motivating and trying to stay in the game as much as possible," Hamels said of the slow pace. "It's easier said than done. When you drag on something for three hours and it's barely the sixth inning, your body will take the toll. I'm glad I play it, but I wouldn't be watching it."
But the Phillies must be glad to see Hamels finish the season strong. Who knows what will happen in the offseason, but there is no question the Phillies need a healthy and effective Hamels in 2014 if they stand any chance of returning to the postseason for the first time since 2011.
"It's huge for just his own sake," Sandberg said. "He's pitched well all year, but he seems to be catching some breaks. He gets himself a base hit that drives in two. Solid defense behind him and Chooch with a home run added cushion, so those are the things you need to win. In a lot of ways, he's pitching the same."