Cultivating optimism involves maintaining a positive outlook and focusing on hopeful outcomes, which can enhance resilience by fostering a mindset of perseverance and growth.