Former prime minister says death of his newborn daughter convinced him of the ‘imperative of good end-of-life care’