I think part of the reason is because he can't risk losing his position as Voldemort's spy.
I think the other part is that he's just genuinely conflicted as to how he feels about Harry. He looks exactly like James, who tormented him for years, but he's got Lily's eyes and his overall demeanor is more like Lily, whom he loved his whole life.
I think its just who he is really and also that he has been a double/triple agent for voldemorte/dumbledore for so long he says one thing and totally means and does the complete opposite...so maybe just holding up pretences for everyone's lives and his...
As for harry...he may despise harry cuz of who harry's father is and harry represents the man who married the love of snape's life but yet he may be cruel to harry but he kept to his vow and protected harry
I think that, for example, about harry, he just protect him for still be Dumbledore's "friend", but don't talk good about him because he was in the side of the dark lord. And also because he ate his father.
True.
That's the essence of being a spy. Words and deeds do not match.
Only the true, deep motives are important. In Severus' case, these shows his real agenda.
However, in the light of his motivations for action, he acts in accordance with his objectives.
Snape is not the only person who does that. He has too many things on his plate - being a double agent, having mixed feeling about Harry (mostly dislike), and is trying to keep everyone from being suspicious of him. Besides - don't we all do that? (Say one thing and do another)