Hamilton was running fifth in the early stages but, along with initial race leader Max Verstappen, he was one of several drivers who pitted under green-flag conditions just before a safety car emerged.
Many of his rivals were able to make cheap stops and, by the time it had all shaken out, Hamilton had tumbled to 10th.
Under the safety car, he inevitably sounded frustrated on the radio. However, at the restart, he put that disappointment behind him and immediately gained three places, including one from Mercedes team-mate George Russell.
Later he passed Lance Stroll after the Canadian made a mistake, before chasing Carlos Sainz for the rest of the race, and eventually finished sixth.
But Hamilton admitted that the timing of the safety car wasn't easy to take.
“Naturally, because so much work goes into the weekend and then yesterday was a difficult day where you went backwards, and then today I was hoping for a better day and I lost so many places, that's definitely a kick in the teeth,” he said when asked by Autosport about his initial reaction.
“But then I was like, ‘well, it is what it is’. I think today shows that the hunger is there. And once I get that confidence in that car, the pace will come out.”
Hamilton insisted that he tried to put his disappointment behind him for the restart.
“I couldn't get bogged down in that frustration and ‘I've lost all those positions’,” he said. “I just had to keep my head down and get focused on attacking, and that's what I did.
“I got my head down and got right back in the race. Yeah, I really enjoyed those battles.
“Really continuously proud of my team for just keeping their head down. We didn't have the pace that we had in the last race, which is obviously not the greatest. But there's no lack of motivation in this team.
“We're all super hungry, we're just working towards getting those upgrades. So I think this is the beginning of something hopefully better in the next coming races.”
At one point during his chase of Sainz, Hamilton asked the team if it could find him more power as he struggled to keep pace with the Ferrari but accepted he didn't have the straightline speed of his rival.
“They're just a little bit quicker on the straight than us I think,” he said.
“Even with the DRS open, he was fast down the straight. And then just following through that mid-sector wasn't so easy, but I gave it everything.
“A driver always wants more power. I think ultimately they shortened the DRS this year down the straight, I don't quite know why they did that. We've always had great racing where the DRS was. By the time you switched the DRS on, it was too late.”