European champions Italy finished second, level on 14 points with third-placed Ukraine, but with a better head-to-head record after a tense affair that could have gone either way.
Luciano Spalletti and the Italians ended six points behind England, who had sealed qualification after beating Italy 3-1 at Wembley in October.
They can still book a spot at a fourth consecutive European Championship via the playoffs in March. The playoff draw will take place on Thursday in Nyon.
"Ukraine showed that they are an equipped team and they gave us a hard time," Spalletti told Rai Sport. "Today we played a good match because in the first half we had many opportunities to secure the result. Then when we didn't manage to do so the match became dirtier and more physical.
"They brought in more physical players but at that moment they no longer played football."
Italy, who will make their eighth consecutive appearance at the Euros, had most possession and created more chances, but Ukraine remained composed as they looked to counter-attack.
Italy's Federico Chiesa had a chance to break the deadlock in the seventh minute, but his effort from inside the box flew narrowly over the bar before Donnarumma denied Ukraine an opener seven minutes later by keeping out Georgiy Sudakov's low shot.
Italy continued to dominate after the break, but Ukraine's probing increased and Mudryk came close in the 66th minute only to be denied by Donnarumma, who pulled off another fine save.
"We are very happy," Donnarumma said. "We are where we deserve to be with all the difficulties we had, but thanks to the new coach and staff we are back."
Under Spalletti, who took over from Roberto Mancini in August, Italy have won three times, drawn twice and lost once. They failed to qualify for last year's World Cup in Qatar.
The European Championship will be held in Germany.
- Jesús Gil Manzano