In Shakespeare's Hamlet, there is a fine line to navigate as to whether Hamlet is manipulative and selfish—where we fall with regard to that line is based upon Hamlet's circumstances.
One might believe that Hamlet is manipulative because he plays Claudius and his supporters like an instrument, knowing what to do to get the response he is looking for. Ironically, Hamlet says something about this very kind of manipulation to Guildenstern.
Why, look you now, how unworthy a thing you make
of me! You would play upon me; you would seem to know
my stops; you would pluck out the heart of my mystery;
you would sound me from my lowest note to the top of my
compass; and there is much music, excellent voice, in
this little organ, yet cannot you make it speak. 'Sblood,
do you think I am easier to be played on than a pipe? Call
me what instrument you will, though you can fret me, you
cannot play upon me. (III.ii.348-356)
When Hamlet tells Guildenstern to play a pipe (flute), Guildenstern swears he does not have the skill, so Hamlet asks he why he thinks he can "play" Hamlet, making him do what Guildenstern (or more likely the King) wants.
This shows that Hamlet very much understands the concept of manipulation. Claudius is trying to keep Hamlet under his thumb and Gertrude happy so he can enjoy being King. Hamlet's intent is to prove Claudius' treachery.
When Hamlet arranges to reenact his father's murder in the play, Mousetrap, he is out to catch a "rat." Claudius' guilty response in seeing his actions shown on the stage convinces Hamlet that the Ghost is honest, and that Claudius did murder Old Hamlet. Once the Ghost appears to Hamlet in Act One), much of what he does is the result of knowing of his father's murder. He manipulates, but his purpose is a noble one.
Hamlet can be seen as selfish. The women in Hamlet's life suffer as Hamlet tries to prove—and avenge—his father's death—though they are not blameworthy. Polonius and, more importantly, her King, tell Ophelia to talk to Hamlet and then tell them what he says. Polonius and the King control Ophelia. She is not free to do as she wants, but Hamlet still blames her and treats her harshly. He asks if she is "fair" (honest). Then he asks where her father is, knowing he is close by—to hear her report:
Where's your father? (III.i.139)
Get thee to a nunnery. Go, farewell. Or
if thou wilt needs marry, marry a fool; for wise men know
well enough what monsters you make of them. (146-148)
Hamlet blames women for making monsters of men: Hamlet has no right to blame Ophelia or his mother for his behavior—or Claudius'.
When Hamlet confronts Gertrude, he rails at her because of her relationship with Claudius—her dead husband's brother. Gertrude had done nothing to cause Old Hamlet's death, but Hamlet feels offended—he is furious because she married again after losing Old Hamlet. (And to marry her brother-in-law in that era was considered incest.)
HAMLET [to Gertrude]:
Leave wringing of your hands. Peace! sit you down,
And let me wring your heart; for so I shall,
If it be made of penetrable stuff... (III.iv.38-40)
He declares that he will lay bare all her sins: because he is mad at her. But Old Hamlet appears and tells Hamlet to leave his mother's judgment to heaven.
Hamlet manipulates to expose his father's murder. He is selfish because he is in deep emotional pain—and he takes it out on Ophelia and Gertrude: though they are not to blame.