I would consider Heraclitus and Buddhist philosophy on the impermanence of all things. We should never pin all of our hopes on one thing, or one person. You are only doing yourself a disservice if you think that any relationship will last forever. OK, that helps, somewhat. But I still feel crummy about the whole thing.
Life is like that.
When you're in pain it means you're involved in life. You must accept the joys with the sorrow. I ask hopefully. First, identify the Problem. Third, Analyze your options for solving the problem.