The war in Afghanistan was lost long before this incident in fact there was never a chance to win this war. We should have done what we needed to do their and left just like we should have in Iraq.
Making an object lesson of Bales will neither help or hinder our efforts in Afghanistan or the Muslim world. He should be tried as any other person that committed such a crime. If he was mentally unstable for whatever reason then he was not responsible for his actions if he was in full control of his faculties then he should be put to death.