Mauro Icardi cancelled out Giacomo Bonaventura's opener before Inter bombarded the visitors for large spells at San Siro.
The hosts hit the woodwork twice early in the second half before Bonaventura completed his brace with a late header as Inter's winless run against Atalanta was extended to six matches.
Defeat also hampered Mazzarri's hopes of European football next season as Inter slipped to sixth in Serie A.
"Clearly we just needed to mark the goalscorer and we wouldn't have lost," he told Sky Sport Italia.
"We can't think to start the second half with four or five chances to put in the net and not score any of them.
"Atalanta could've scored earlier when Jonathan performed a goal-line clearance. Atalanta are a good side and came here with no pressure, so it was obvious they could worry us.
"We hit the woodwork repeatedly and I think we've done that more than anyone else this season.
"We practically gave away the first goal, then we gave away the second because of some poor marking. That's football, if you don't take your chances then you get punished."
The defeat ended Inter's six-game unbeaten run, but Mazzarri's side have the chance to bounce back when they take on three of the bottom seven teams in the next two weeks.
Inter host Udinese on Thursday and travel to Livorno the following Monday before returning to San Siro for the visit of Bologna.
Get the best features, fun and footballing frolics straight to your inbox every week.
Thank you for signing up to Four Four Two. You will receive a verification email shortly.
There was a problem. Please refresh the page and try again.