The Rossoneri have won just three of their 10 Serie A games this season, leaving them in 10th, but the 46-year-old Italian believes that they will rise up the table if they continue to play as they did against the Biancocelesti.
"The team played an excellent first half, not allowing Lazio any opportunities," Allegri told Sky Sport Italia. "The side played well in terms of technique and defending, but we lost our unity a little after the equaliser and allowed a couple of dangerous counter-attacks.
"We have to keep working and putting in this sort of performance. How we get out of this situation is to keep working. We're far away from third place, so we have to get back to winning ways and have a difficult game with Fiorentina coming up.
"We cannot let our heads drop, as if we keep playing like this then I'm sure the team will get some good results."
Milan welcome Fiorentina to the San Siro on Saturday evening.