No reason for him to be ashamed. It's not as if he refused to give his all. He's simply not able to give more than what he did. The bigger issue is that we have to rely on him so much.
Dzeko has generally been fine in the two years he's been here - the issue is that he's been asked to play more than he should've due to various issues (Correa being useless, Lukaku injuries).
He does need to leave however. I still give him credit for the two years he's been here. The two goals against Shakhtar were huge for us to get over the mental block we had for all the group stage exists in the Champions League. He's also had some big goals for us over the two years (scored vs. Juventus, multiple goals against Napoli, Atalanta, Roma, Milan).
Class player in his prime. Shame we had him at the end of his career, but he still deserves respect for giving his all. I'm actually impressed that he's very rarely injured given his age and the number of games he has played for both club (including 3 competitions) and country.