Hamlet, like anyone else, behaved and continues to behave differently with different people. However, there is clear evidence of a drastic change since his father's death. This is most dramatically attested by Ophelia when she laments,
O, what a noble mind is here o'erthrown!
The courtier's, soldier's, scholar's, eye, tongue, sword;
The expectancy and rose of the fair state,
The glass of fashion and the mould of form,
The observed of all observers, quite, quite down!
And I, of ladies most deject and wretched,
That suck'd the honey of his music vows,
Now see that noble and most sovereign reason,
Like sweet bells jangled, out of tune and harsh.
Making allowances for Ophelia's partiality, this speech depicts a Hamlet who seems to have been an ardent and thoughtful lover, as well as a true Renaissance man. As Hamlet appears in the play, there is little sign that he cares for Ophelia at all, and Ophelia does not delude herself about this, so it seems reasonable to suppose that she was not entirely mistaken about his previous character and intentions.
Hamlet's "transformation" (as Claudius describes it to Rosencrantz and Guildenstern) is much discussed by other characters, and the evidence all points the same way as Ophelia's speech. Hamlet used to be well-adjusted, courteous, and highly accomplished. However, the very fact that he selected Rosencrantz and Guildenstern as close friends whereas he now sees straight through them suggests that his character may have acquired depth along with melancholy.
The same may also be true of his treatment of Ophelia. Since he treats her harshly now, it seems that his feelings for her were never very deep, certainly in comparison with his love for his father. However, before his father's death, he was capable of making glib speeches of love without deep feeling.