To arrive at that, it is first important to investigate reasons for hating a person. From my experience, the reason we hate someone is because that person might be threatening our "ego". What is ego by the way? One of the meanings available in the dictionary is "The self, especially as distinct from the world and other selves." Ego typically has a negative connotation, but the verbatim meaning from dictionary seems quite innocuous . It might not be immediately obvious as to why "ego" is considered evil. But on closer observation, you will find that, when you consider yourself "distinct" from the world and other selves, you begin to expect a life that is superior to others. You want to distinguish your self by having superior patronage, clout, name, fame, money, love, affection etc. And so when a person threatens / subjugates your distinct self (i.e. your ego), it hurts, and you will want to hurl this person out of your life. You will start hating this person.
So much for the meaning of ego. But how to escape from the predicament of having to deal with such a person? The solution is then to turn it on its head. Do not consider yourself "distinct". The "cosmic consciousness" is the idea that the universe exists as an interconnected network of consciousness, with each conscious being linked to every other. By this definition, we are all one and the same. There is no distinct self. Why then should we hanker after distinction? The moment you realize this, you will stop hating someone. For e.g. , consider for a moment that you hate your colleague, because the person is not massaging your ego, or worse threatening to destroy your ego (i.e. superior patronage, fame, name etc.). But what if you do not consider yourself distinct, and what if you do not feel the need to get superior patronage or fame. Would you still hate this person? The answer will be a definite NO. This is one of the important lessons from our scriptures. The soul and consciousness transcends the physical form, knowing that, do not hurt or harm others, do not consider one superior to the other, and bliss is assured.