The Rossoneri had gone into the game trailing 2-1 after their meeting at San Siro last month but the visitors managed to force extra time, after replying to Alessandro Del Piero's 28th-minute opener with second-half goals from Djamel Mesbah and Maxi Lopez.
Mirko Vucinic's stunning long-range strike ultimately settled the tie in the hosts' favour but Allegri saw no reason to be downbeat afterwards, and insisted that Milan will have no problems picking themselves back up for Saturday's crucial Serie A clash with Roma.
"Milan have gone out with their heads held high," the former Cagliari boss told Rai after the full-time whistle. "I'm happy with the performance from the lads.
"It's a pity that we haven't been able to reach the final, but we brought some players back who had not played for a while.
"In extra-time we were very tired, we had expended a lot of energy and we were not able to really attack them.
"We will be ready for Saturday as we have four days to recuperate. A few players did not play tonight, while some others were effectively only on the field for a half, like [Antonio] Nocerino and [Zlatan] Ibrahimovic
"I'm confident ahead of our upcoming matches because the team played a good game tonight."
Ibrahimovic had been replaced by during the half-time interval, sparking fears that he might not be available for the visit of the Giallorossi but Allegri insisted that the Sweden international's withdrawal had been a purely precautionary measure.
"Ibrahimovic still had some back pain so I decided to take him off," the 44-year-old coach explained.
Milan's meeting with Luis Enrique's resurgent Roma side gets underway at 18:00CET.
How do you stay up to date with football when on the move? With http://m.goal.com – your best source for mobile coverage of the beautiful game.