I just did the research and confirmed that we can take a tax deduction for our son, who died shortly after birth, even though we don't have a social security number for him. Publication 17 from the IRS explains it, and I was surprised to see that TurboTax had no problems handling it - after I didn't put in a social security number, it told me that this was only valid if my child was born and died in 2009, and had me confirm that.
irs.gov
It turned my stomach to enter the info in turbotax, but we spent so much money on that pregnancy and trying to bring him into the world healthy that I'm trying not to feel guilty about it.