Gratitude and Hope

How does gratitude help us look toward the future with optimism… especially
when the future otherwise looks bleak?