The book Seveneves is about civilization confronting impending doom from the moon exploding. I never finished the book because I felt it was depressingly realistic.