he had always prided himself on his capacity for rationalism , and once he had been given the terminal prognosis , he had quickly passed through the stages of shock-denial-grief-anger-acceptance , and spent his last few months as profitably as possible .