Prince Harry has thanked an author who sent him a book aimed at helping children cope with grief following the death of a parent.