A Muslim is a brother to a Muslim
Abu Hurayrah (radi Allahu anhu) reported that the Messenger of Allah (sal Allahu alaihi wa sallam) said, “A Muslim is a brother to a Muslim. He should neither deceive him nor lie to him, nor leave him without assistance. Everything belonging to a Muslim is inviolable for a Muslim; his honour, his blood and property. Piety is here (and he pointed out to his chest thrice). It is enough for a Muslim to commit evil by despising his Muslim brother.”
This Hadith deals with the subject discussed in the preceding hadith (HaD-643). In fact, it makes clear the points raised there.
Now, the heart is one thing which no one can check out; Allah Alone knows about it. The case of those who openly lead a sinful and impious life is of course quite different. To show hatred and disgust against such people is warranted by Faith.
And Allah Knows Best!