If an infant only survives for one day Rachmana litzlan, do the parents have to sit shiva or say kaddish?
On this topic, see the important article (Jewish Guidance on the Loss of a Baby or Fetus) by R Jason Weiner (senior rabbi at Cedars-Sinai hospital in Los Angeles) in Hakirah vol. 23 (here). He writes
A fetus that dies in the womb or is born dead (stillbirth) is called a “nefel,” and no laws of mourning apply. If the baby is born alive, the rules are more complex. Generally, a baby who lives for less than thirty days is in a category of uncertainty and is categorized as a “safek nefel” (even if the baby died from an external cause, such as an accident [Gesher Ha-Chaim 19:3(4)]). Since Jewish law is lenient when it comes to mourning, one is not obligated to observe the laws of mourning for the death of a baby who dies within thirty days of birth (Semachot 3:1; Shabbat 136a; Rambam, Hilkhot Avel 1:6; Shulchan Arukh, YD 374:8, all based on Torat Kohanim, Emor 1:6).
However, if it is certain that the baby was born after nine full months of gestation (certainty would require the parents to not have had relations since conceiving nine months prior to the birth), then if the baby is born alive, even if he or she dies that day, the baby is not a “safek nefel,” but rather a “ben kayama”—a “viable” baby, the term normally given to a baby that survives more than thirty days. In this case, one observes all mourning laws and customs (Shabbat 136a; Niddah 44b; Rambam, Hilkhot Avel 1:7; Shulchan Arukh YD 374:8), but not the traditional funeral practices. However, in practice, many are not accustomed to observe the mourning customs in this situation unless the baby survives at least a few days after birth (Ke-Chalom Ya’uf, 95).
Pages 106-107 go deeper on the issue of shiva (not required) and kaddish ("There is no obligation to say Kaddish after the passing of a fetus or baby younger than thirty days, and it is not customary to do so.")
See the article for the spiritual reasons why this is the case and approaches for dealing with such terrible cases, e.g., see footnote 20 on p. 98 where R Yosef Tzvi Rimon is quoted
If the parents developed a connection to the baby, a funeral or shivah may be recommended to help them cope. (This may apply to saying Kaddish, even for an entire year, since this ritual may have a positive influence on the one saying Kaddish.)
May God comfort all families suffering such a terrible experience. And as with all personal issues, please ask your rav for any personal ruling.
I asked R Binyamin Tabady this question. His view is that one does mourn a baby who died within the first 30 days. He brought two different proofs, from a tshuva from R Kook and from the laws of twins who died after birth.
But he was puzzled that the answer was not directly addressed in the Hebrew sifrei halacha he consulted (except for Yalkut Yosef who rules one does mourn), so he called a few prominent Israeli rabbanim to get their views.
R Benzion Nesher (a prominent dayan in Tel Aviv who answers many "tough questions" for the rabbanim of the city) and Machon Puach (a Torah institute specialized in fertility issues) both agreed that one does mourn such a baby. R Avraham Reznikov (the Rav of Ichilov hospital, one of the two main hospitals in Tel Aviv) ruled that one doesn't.
Since opinions are split, anyone facing this tragic circumstance should consult with their own rabbi.
Rambam (Avel 1:6)
הנפלים אין מתאבלין עליהן וכל שלא שהה שלשים יום באדם הרי זה נפל אפילו מת ביום שלשים אין מתאבלין עליו:
We do not mourn for stillborn infants. Whenever a human offspring does not live for 30 days, he is considered as stillborn. Even if he died on the thirtieth day, we do not mourn for him.