'In this moment, I had to be there' — Patricia Lockwood on writing about the life and death of a child