Despite the fact that the mistrust and hate between Harry and Snape is an important theme of the whole series, I do not fully understand Snape's behaviour in OOTP from a logical point of view, especially during the Occlumency lessons.
I collected some facts from the whole series to make my points at the bottom clearer. I am sorry that I cannot provide quotes, since I only have the (unabridged) audio books.
General Snape facts:
- Snape is for the most part a very rational and controlled character (despite his uneasy/mean appearance).
- Snape is a member of the Order.
- His deal with Dumbledore is that he will protect Harry's life by all means.
- It is even more than a deal, because the killing of Lily was ultimately induced by Snape telling Voldemort the (partial) prophecy in the first place, leading to Snape's catharsis after he realises the full extent of his actions.
- That Snape actually cared more for Harry than it seemed becomes clear when Dumbledore reveals that Harry would have to die ("You raised him like a pig for slaughter!").
Situation in OOTP:
- It is pointed out several times by several characters that it was the most urgent and seriously most important thing (no kidding now) that Harry learns Occlumency after realising that Voldemort can penetrate Harry's mind.
- Snape points out to Harry that it is his (Snape's) job to find out the Dark Lord's plans for Dumbledore.
So, in summary, Snape should have been motivated as hell to teach Harry Occlumency properly to help the order and to protect Harry. For me, that includes being encouraging and helpful, not behaving as a "slimy git" and putting Harry under pressure with dislike and insults.
Even when Harry is caught using the Pensieve to explore Snape's memory, Snape could have exploited the situation to make Harry less biased towards him and straighten out their relationship in order to teach him Occlumency properly (i.e. controlling his understandable rage). The cognitive dissonance caused in Harry by seeing James and Sirius bullying Snape even let him take the risk to break into Umbridge's office just to have a chat with Sirius.
Are there any facts I missed that explain Snape's behaviour in a logical way?
Note: I hope I pointed out clearly enough that for me, Snape's general dislike or ambiguity towards Harry does not explain Snape's (irrational) behaviour convincingly.
Further note after comments and ASH-Aisyah's answer: To me, Snape's behaviour seems to be inconsistent. He manages to stick to Dumbledore's plan all the time and against all odds, but does not in this particular and critical case. Regarding his pretended loyalty towards Voldemort, he could have lied that someone else told Harry Occlumency, if Voldemort found out.