If the matter is as you describe in your question, we advise you to strive hard to distance yourself from this man and to cut off this relationship that is based on great love for him, because that is damaging to your religious commitment, and the affect of that is clear from your words about your deep attachment to him, your lengthy relationship with him and your not being able to leave him. All of that is very damaging to the Muslim's aqeedah (belief) which requires him to disavow the disbelievers and to take as close friends and love the believers. Allah, may He be exalted, says (interpretation of the meaning):
You (O Muhammad SAW) will not find any people who believe in Allah and the Last Day, making friendship with those who oppose Allah and His Messenger (Muhammad SAW ), even though they were their fathers, or their sons, or their brothers, or their kindred (people). For such He has written Faith in their hearts, and strengthened them with Rooh (proofs, light and true guidance) from Himself. And We will admit them to Gardens (Paradise) under which rivers flow, to dwell therein (forever). Allah is pleased with them, and they with Him. They are the Party of Allah. Verily, it is the Party of Allah that will be the successful.
This love of the heart is a serious matter, because it is contrary to the teachings of al-wala' wa'l-bara' (love and loyalty versus disavowal and enmity), which is one of the most important basic principles of Islam and one of the strongest bonds of faith, which is indicated by a great deal of evidence from the Qur'an and Sunnah. Please see the answer to question no. 47322 and 23325
This does not mean that you cannot treat him kindly if you meet him or you have a class together or work together, without being eager to meet him outside of school or work. So strive to correct yourself and end this forbidden friendship. If it so happens that you meet for any reason, make it your main concern to make him love Islam and call him to it, and warn him of the grave situation that he is in, in the hope that Allah may decree that he be guided out your hand. At that time, your love for him will be beneficial to him when you to call him to Islam. We ask Allah to help you to do that which is good.
And Allah knows best.
Reproduced from Islam QA