Studies show that having a solid foundation can help you build resilience.