Think of this like getting a dozen cupcakes. You eat a half a cup cake each day, you enjoy the cup cake in that moment. When all of the cupcakes are gone, you are sad because no more cupcakes. But you had a lovely (almost whole) month of cupcakes.
You can’t get too attached – you know his plans. You know this is temporary and you know that when he leaves, this will end. That is how it’s supposed to be. And I say this as both the person who went away and the person who was left behind. You will be emotionally safer if you abide by that break