New research highlights common themes shared by people who found reasons to keep living through dark times.