A 35-year-old woman at 31 weeks’ gestation has six weeks of low mood, guilt and early-morning waking. During the past week she has stopped eating, believes her baby is already dead despite reassuring scans, and says she will kill herself if discharged. Her husband reports that she spends long periods staring at the wall and has stopped speaking to the family. She has no previous psychiatric treatment and is medically stable. Which one of the following is the most appropriate treatment?