Why is missing someone sometimes painful

As humans, we surround ourselves with people with enjoy being with and at times we cannot always be with that person which causes us to miss them whether it’s for a good or bad reason the feeling is sometimes unbearable. The scientific reasoning is that “our brain reacts significantly when we’re missing someone we love  The oxytocin and dopamine that’s released during a relationship suddenly stops flowing. You become chemically dependent on their presence in your life. In I believe it’s like an infatuation and when you try to distract yourself from missing that person it gets really difficult because Humans tend to fixate on what they don’t have.