The European champions were beaten by two strikes from Ferran Torres, with captain Leonardo Bonucci sent off before half-time.
Lorenzo Pellegrini pulled back a goal late from Federico Chiesa’s lay-off but it was too little, too late for the Azzurri.
“It would have been better not to suffer this defeat but we knew that sooner or later eventually we would have to lose a game,” Mancini said.
“It is better for it to come tonight than in the final of the Euros or the World Cup.
“I believe though that this game makes us even stronger despite the defeat and allows us to understand that we are truly a great team.”
Italy goalkeeper Gianluigi Donnarumma was jeered by home fans at Milan’s San Siro throughout the game following his free transfer from the Rossoneri to Paris Saint-Germain.
“For sure [Donnarumma] wasn’t happy about the whistles during the first half but what could we do?,” Mancini said.
“We are all adults and we have to accept also this situation and in the end I think Gigio despite that played a good game. It certainly won’t have pleased him, just as it did not please us. Gigio did well.”
Spain’s win means they will face either France or Belgium in the Nations League final, much to boss Luis Enrique’s delight after losing to Italy at the Euro 2020 semis.
“We have once again created chances, and we have overcome them,” Luis Enrique said.
“The best thing since I’ve been with the national team is that we’ve managed to play our game, regardless of the rival and the tournament.”
