The opposite of nostalgia, mellalgia is a sentimental longing or wistful affection for the future, typically for a period or place with happy personal associations.
Ety. Greek: μέλλο: “future” + ἄλγος: “pain.”
Inspired by the late Svetlana Boym’s wonderful book, The Future of Nostalgia. Mellalgia is the topic of Proust’s unfinished book, Remembrance of Things to Come. C. J. Cherryh experiments with the idea of mellalgia in her short story, “The Threads of Time,” in which she describes her time traveling protagonist experiencing such a feeling:
He lived scattered lives in ages to come, and remembered the future with increasing melancholy.
I totally made this word up in the name of academese.