For the source text click/tap here: Bava Batra 102
To download, click/tap here: PDF
The Gemora says that they would make special graves inside the burial chamber especially designed for nefalim (stillborns). This would indicate that there is in fact a mitzvah to bury a neifel.
The Rema in Hilchos Yom Tov (526:10) writes that one is not allowed to bury a neifel on Yom Tov, rather he should be buried the next day. The source is from the Hagahos Maiomonies who holds that there is no mitzvah to bury a neifel. However, the Magen Avrohom (20) says that in his opinion, there is a mitzvah to bury a neifel.
The Hagahos Maimonides cites the Gemora in Pesachim (9a) which implies that there was a pit that was designated to throw nefalim into, implying that there isn't any mitzvah of kevurah (burial).
The Gr"a also takes this approach - that the fact that they were thrown into a pit indicates that there isn't a mitzvah of kevurah.
We explore the status of stillborns in antiquity.