The ideal way for Muslims to deal with a dhimmi is to fulfil his rights and what is due to him. The evidence for this is the verses and hadiths that command keeping promises, doing good to him, and treating him justly. Allah the Exalted says:
لَّا يَنْهَاكُمُ اللَّهُ عَنِ الَّذِينَ لَمْ يُقَاتِلُوكُمْ فِي الدِّينِ وَلَمْ يُخْرِجُوكُم مِّن دِيَارِكُمْ أَن تَبَرُّوهُمْ وَتُقْسِطُوا إِلَيْهِمْ ۚ إِنَّ اللَّهَ يُحِبُّ الْمُقْسِطِينَ
“Allah does not forbid you from those who do not fight you over the religion and do not expel you from your homes, from being good to them and acting justly towards them. Indeed, Allah loves those who act justly.”
He should be treated with gentleness in speech and, generally, be shown kindness, except in matters that the Shariah forbids, such as: initiating the greeting of salam, marrying him to a Muslim woman, making him an heir of a Muslim, and similar matters whose prohibition is established by a text. For the detailed rulings on this subject, refer to Allamah Ibn al-Qayyim’s book “Ahkam Ahl al-Dhimmah” and the statements of other scholars on this topic.