He was speaking at Lancaster House after visiting Westminster Hall to pay his respects to the late monarch.
Mr Biden arrived with his wife Jill at the lying in state shortly before 5pm on Sunday, ahead of his attendance at Monday’s funeral.
They were joined by the US ambassador to the UK, Jane Hartley.
The president stood on the platform for around two minutes, taking in the scene, where he crossed himself and exchanged a few words with the first lady.
He looked on with a sombre expression and put his hand to his heart before walking away.
Large crowds were gathered behind barricades near Buckingham Palace and Parliament Square Garden ready to take photos of the motorcade as it glided into the Palace of Westminster.
Some children were sitting on their parents’ shoulders trying to get a view.
Security was tight and road crossings were closed ahead of the visit as rumours spread through the crowd about the imminent arrival of the president and his entourage.
Mr and Mrs Biden were greeted at Westminster Hall by Black Rod Sarah Clarke.
They then travelled to Lancaster House, where Mr Biden and his wife signed the book of condolence.
The president and first lady were met by Foreign Secretary James Cleverly and Robert Alexander, head of government hospitality at the Foreign Office.
Speaking at Lancaster House, Mr Biden said: “To all the people of England, all the people of the United Kingdom, our hearts go out to you.
“You were fortunate to have had her for 70 years, we all were.
“The world is better for her.”
He also said the Queen reminded him of his own mother.
He said: “She had that look like, ‘are you OK? Anything I can do for you? What do you need?’
“And also ‘make sure you do what you’re supposed to do’,” he joked, wagging his finger.
He added: “I have talked about how my mother and father thought that everyone, no matter who they were, no matter what their station, no matter where they are from, deserved to be treated with dignity.
“And that’s exactly what she communicated – just the way she walked by her staff, just the way she acted.
“I think what she gave was a sense of, above all, the notion of service – we all owe something.
“There is something in our capacity to do that can make not just the world better, but your neighbourhood better, your household better, your workplace better, and that’s what she communicated to me and it was an honour to meet her.”
Mr Biden said the Queen was “the same in person as her image – decent, honourable and all about service”.
“Our hearts go out to the royal family, King Charles and all of the family. It’s a loss that leaves a giant hole and sometimes you think you’ll never overcome it,” he said.
He recalled when the Queen had him and the first lady over for tea and – as he joked – “crimpets”, which “she kept offering me more and I kept eating everything she put in front of me”.
Shortly before 6pm, the president and first lady arrived at Buckingham Palace for the King’s reception for visiting heads of state.
The couple arrived in the presidential car among a convoy of other vehicles.
The president had been due to meet Prime Minister Liz Truss on Sunday, but the talks were cancelled on Saturday.
A “full bilateral meeting” was scheduled for Wednesday when the leaders are set to be in New York for the UN General Assembly.