He was slightly buzzed, both from the alcohol and from the curse he placed on the Defense position. The fact that he'd started a bar fight helped too.
Tom Riddle doesn't like being touched, or touching others. However, there is one exception. Harry Potter
Tom Riddle, a little mudblood nobody. He tries and he tries, but he can never get to where he wants to be with just his magic and intellect. So, he tries a different method.
Tom is dying, he knows that. Harry knows that too. But as long as they're together, despite the Aurors surrounding them, despite the knowledge that they're going to die together rather painfully, they're safe and sound.