The root of suffering is attachment. You have created a space in your mind that holds a person or object as part of you. When that person or object is criticized, neglected or not with you, you feel pain in your mind and you experience a sense of loss.
If you want to be happy, you must learn to love and appreciate while remaining independent.