One day he was visiting a neighbour who was dying and he prayed the Lord to have mercy on him because he was very poor and had worked so hard all his life that he had n't much time to attend to religion .