Ecclesiastes 6:3-5 NIV

3 A man may have a hundred children and live many years; yet no matter how long he lives, if he cannot enjoy his prosperity and does not receive proper burial, I say that a stillborn1 child is better off than he.2

References for Ecclesiastes 6:3

4 It comes without meaning, it departs in darkness, and in darkness its name is shrouded.
5 Though it never saw the sun or knew anything, it has more rest than does that man--