What happened to Milan in second part of season?
It's difficult to pinpoint a single reason for their recent mediocre results, things are, imo, very complex.
The campaign began well for them as you noted, with just one loss in their first 25-30 matches iirc, possibly the best performing team in all of Europe, and it just wasn't possible to keep up until the end, it was unsustainable as simple as that.
The tight schedule (including their Europa League rendezvous) and multiple injuries in defense primarily resulted in rather unwanted draws against weaker opponents. And, although they have a reasonable amount of players to choose upfront, Pioli is forced to play with Kalulu and Tomori (neither of them has a place in this team) if Kjaer and Romagnoli are not available. I'll use Liverpool as an example: when your key guys (centre-backs) are absent, things get really difficult.
Milan will almost certainly not qualify for the Champions League, Atalanta and Napoli have relatively easy remaining fixtures, and the final spot will probably go to Juventus, who have a direct match with Milan next week.