I experienced that with longing come imperfections and distortions of love.
When you are in longing, you seek love and attention of others. This brings imperfections like ego and jealousy, especially when you feel that others are getting that love and attention.
Longing has no solution. You have experienced both being in the presence and not being in the presence of the person you long for. You learnt that even if you be in the presence of the person you long for, it is incomplete and does not guarantee trupti for ever. Maybe, a couple of days later or even hours later, you will again long. And if you are not in that presence, you feel that urge and maybe, depression.
Whatever it be, it seems that first you go through both being in the presence and not being in the presence, and experiment with both. And, maybe, what you conclude is that you should learn to be with the self and not with any other person’s company.. however difficult that may be, that seems to be the best solution.