Neville has been intimately acquainted with grief, with the ghosts of the people he loved hunting him, all his life, so he knows very well that all he can do is just be there for him. Which is why after the battle he brings Theo home with him, holding his hand as he explains to his grandmother how during the war he has fallen in love with the Slytherin, how Theo was grieving for the childhood friend he just lost, the friend he came out of hiding for, the friend he joined the Order for.