Arif Billah Hazrat Maulana Mufti Abul Qasim Nomani Sahib, Mohtamim and Sheikh-ul-Hadith Darul Uloom Deoband, has given a valuable advice. He has issued an excellent writing on social life and dealing with those who agree and disagree with you.
He stated that: Al-Sadiq wal-Masduq Muhammad Arabi (peace and blessings of Allah be upon him) said: Love your beloved moderately, for perhaps one day he will be your enemy, and hate your enemy moderately, for perhaps one day he will be your beloved.
He stated that be careful in your friendship with your friend, it is possible that one day he will become an enemy, and be careful in your enmity with your enemy, it is possible that one day he will become your friend.
That is, do friendship and enmity in moderation.