In 19:17 the passuk tells us, "לא תשנא את אחיך בלבבך הוכח תוכיח את עמיתך" - Do not hate your brother in your heart, rebuke your friend.
Both parts of the passuk are referring to your fellow Jew - not to hate your fellow Jew in your heart, but to get it out and work things out, and to rebuke your fellow Jew.
So why the change of terminology? Why use the term "brother" and then switch to "friend"?
I think the passuk is telling us that if you are going to hate somebody, hate him like your brother, and if you are going to rebuke somebody, rebuke him like a friend.
In other words, nobody hates their brother secretly while making it look like you get along. if you hate your brother you always fight with him. There is nothing swept under the carpets between brothers. When you rebuke your friend, you do so to help him improve himself and you do it in a constructive manner.
So whenever you might hate a fellow Jew, it should at least be as though he was a brother. Out in the open. Not made to look like love but having the hatred fester beneath the surface.
Whenever you rebuke a fellow Jew it should be as a friend, done constructively.