Neville stayed close to his wife and son. They along with Al, Snape and the rest of the 'family' was there main reason Neville was there. Funerals, ironically, were for the living, a chance to say goodbye in a fashion if one hadn't gotten to in life, or so it seemed to him. And, to be there if the family needed you, a means of showing support and solidarity.
He would never know fully, even with the glimpse Al had given him, what had been going throuugh Lily's mind in the days leading up to her final act, but he could show that he still (even if it had come back belatedly) still held fondness for her in his heart. She had done, or been made to do (he would never fully know which) some horrendous things, but those weren't all she had been. He wished both she and especially Hope had gotten the chance to be more, to get past that and who's daughter hope was. Now they never would. And he could do nothing but love the ones left.
At Harrys grave he sent out a silent thougt, for his own comfort, not believing that Harry would actually hear. Nor was it necessary, Harry had know tha Neville loved him, he just needed to make sure the ones still living knew and always did, from now on.