The true moments where strength and vulnerability meet are those when we make a choice to do what's right despite knowing that it can hurt us. In Casablanca, it's when Rick turns Ilsa away, knowing that her work is too important. In this, it is Harry taking the penseive to the Department of Mysteries.
Just like the Mirror of Erised, Harry longs for so much that he has been denied: love, family, respect, forgiveness. He never got any of them from Snape, and that lingers. Add in the fact that his mother did have all those things with him, and Snape becomes the broken link in this chain that Harry needs to fix.
While I have to say the physical expression is uncomfortable, like God of Small Things by Arundhati Roy, it has a concrete reason for it, and it is a link that they cannot forge another way in so short a time. A brief comfort, taken while knowing it will be snatched away.