Craig Mackey told new recruits at the police training college Hendon it had also been been an awful week "for the policing family".
But he said they would "never be alone" and that their city was proud of them.
It comes two days after PC Keith Palmer was killed preventing Khalid Masood from entering Parliament.
Masood, 52, drove his car onto the pavement and into pedestrians on Westminster Bridge before crashing the vehicle into railings and running into the grounds of Parliament.
On Friday acting commissioner Mackey said: "We are mourning the loss of a brave officer, PC Keith Palmer, who died protecting Parliament and our democracy.
"At moments like this, rare though they are, it is natural to be afraid and to despair at the inhuman violence we have seen.
"But it is at moments like these that you truly appreciate the strength of the policing family."
Fifty people were injured in Wednesday's attack, with 31 receiving hospital treatment.
Two people remain in a critical condition, and one has life-threatening injuries.
Acting commissioner Mackey told the new recruits: "As police officers, we have a special bond with the public, as their protectors and guardians. It is a bond that grows stronger in adversity.
"We have seen the gratitude of this city to its police service manifested this week with kind words and gifts. They're proud of you and your colleagues. As am I."
On Thursday evening acting commissioner Mackey joined Home Secretary Amber Rudd, London Mayor Sadiq Khan and hundreds of people at a candlelit vigil in Trafalgar Square to remember those who lost their lives as a result of Wednesday's attack.
Candles were laid on the ground and on the steps leading to the National Gallery, then lit in memory of those who died.
Earlier, Army veteran Mike Crofts, who witnessed the attack and rushed to help PC Palmer, told BBC Breakfast it was his military training that made him react.
"Unfortunately despite our best efforts we were unable to save him.
"He was at the time surrounded by a whole host of colleagues who really loved him. We held his hand through the experience, talked to him throughout."who lost their lives.
The acting commissioner of the Metropolitan Police has told trainee officers they are joining the force in "an awful week for London".