A cognitive shift that can help you in difficult times.