Briefly, Sam is experiencing the shock of those who first lose someone close to
them. The discovery that the world goes on is unbearable, but it shows
that there is still hope. This hope is what enables Sam to take on
Frodo's mission. The taking of Frodo's Elvish things is Sam's way of
linking himself to his master and finding a way to remain connected to him
despite the loss. Talking to Frodo is another way of keeping him close
by; it is a defense
mechanism.
************************
"All wizards should have a hobbit or two in their care..."