Grief fills the room up of my absent child,
Lies in his bed, walks up and down with me,
Puts on his pretty looks, repeats his words,
Remembers me of all his gracious parts,
Stuffs out his vacant garments with his form.
Constance in King John (William Shakespeare)
He put a lot of himself into his work. In Hamlet, I think he is reflected best in Horatio rather than in the Prince himself.