Dear Ashmita,
The duration of the maternity benefit fixed u/s 5 (3) of the Maternity Benefit Act,1961 gets modified by the conditions mentioned in the second proviso to the same section in the event of the death of the mother ( employee) or child or both either during delivery or immediately after delivery.
If we analyse the above proviso, we can understand that -
(a) first it speaks about the death of the mother either during the delivery or immediately after delivery leaving the child alive and
(b) second about the surviving child dieing after the death of the mother.
In case (a), the maternity benefit shall be paid in its entirety despite the death of the mother.
In case (b), the benefit shall be paid upto the date of death of the child.
In any neonatal case as such cited in the post, the employee is entitled to maternity benefit for the entire period.