Throughout Shakespeare's play, Hamlet, the recurring question asks: is Hamlet insane or is he playing a part to prove Claudius has murdered Hamlet's father, Old Hamlet?
This point is central in deciding whether or not Hamlet loves Ophelia.
In Act One, scene v, Hamlet is very clear with Horatio that if his friend sees Hamlet acting strangely—if Hamlet "puts on an antic disposition"—Horatio must give no indication whatsoever that he is aware that Hamlet is not as mad as he is pretending to be.
Here, as before, never, so help you mercy,
How strange or odd soe'er I bear myself—
As I perchance hereafter shall think meet
To put an antic disposition on—
That you, at such times seeing me, never shall,
With arms encumber'd thus, or this head-shake... (189-194)
With this understood, even through Hamlet's depression over his father's death, we may assume that he is acting crazy so that his enemy (Claudius) will have no way of being able to tell if Hamlet is suspicious of him or simply insane. Unfortunately, Hamlet's behavior applies to Ophelia also.
Hamlet and Ophelia have obviously spent time together—they have exchanged "love tokens." Polonius and Laertes, her father and brother (respectively) have warned Ophelia not to believe Hamlet's sweet words—because of their different social standing.
Claudius and Polonius have told Ophelia to report what Hamlet says back to them. Hamlet, with good reason, does not know if he can trust Ophelia, and in that era, Ophelia (as a woman) would have had no choice about cooperating. However, I believe that she still loves Hamlet, harboring secret feelings for him. Hamlet does not give Ophelia and her capacity for love enough credit—doubting that she could defy the others (albeit privately) and still love him.
So Hamlet is rude and insulting, acting insane. For example:
I did love you once.
Indeed, my lord, you made me believe so.
You should not have believ'd me, for virtue cannot so inoculate our old stock but we shall relish of it. I lov'd you not.
I was the more deceiv'd.
Get thee to a nunn'ry, why woulds't thou be a breeder of sinners? (III.i.114-121)
While Hamlet acts like he has no feelings for Ophelia, he knows that something of what they speak about will be carried back to Claudius: he is Ophelia's king.
During the play-within-the play (III.ii), where Hamlet reenacts his father's death to watch Claudius' reaction, Hamlet is again vulgar and hurtful towards Ophelia.
Hamlet mistakenly kills Polonius. Claudius sends him to England (asking that king to kill Hamlet). Hamlet "escapes;" but while he is gone, Ophelia has lost her mind, and has drowned. Quite by chance, in Act Five, scene two, Hamlet comes upon Ophelia's funeral; we have not seen him as distressed since the start of the play when his father had died. Hamlet throws himself into Ophelia's grave, telling Laertes—and all those gathered—that no one lived Ophelia as he did, and that he would die with her.
I loved Ophelia. Forty thousand brothers
Could not, with all their quantity of love,
Make up my sum. What wilt thou do for her?...(270-272)
'Swounds, show me what thou'lt do.
Woo't weep, woo't fight, woo't fast, woo't tear thyself?
Woo't drink up eisel, eat a crocodile?
I'll do't. Dost thou come here to whine,
To outface me with leaping in her grave?
Be buried quick with her, and so will I. (V.i.275-280)
I believe Hamlet did love Ophelia at the end—but there was no chance—it's a tragedy.