I've worked with two basically brain dead but breathing babies we allowed to die. Both could breathe on their own, but they couldn't eat (Tracy Latimer could do both). Neither had any meaningful brain activity and would never be able to smile, laugh, recognize people, etc (Tracy Latimer could). We simply stopped feeding them with tubes. They died of dehydration a short time later (within a week or so). We did give them morphine. It was more for their parents' peace of mind than anything. There were nurses who thought it was immoral and they were not assigned to look after those babies. The parents were supported and both babies died while their mothers held them.
In my experience we usually err on the side of giving something for pain even if it isn't needed. We also take babies who are on ventillators off and allow them to die if their prognosis is poor and the parents agree. They are also given some sort of pain meds beforehand. Whenever possible, we have the parents hold the babies when they die. If the parents don't want to do it a nurse will always do it. Whatever the baby's cognitive abilities, I have never met a nurse who thought it was ok to let it die without being held and given some human contact.
I support those decisions. I generally wish more parents would decide to let their extremely ill babies pass away. But, I can't support killing someone who can breathe and eat and smile and laugh. That life isn't a good one IMO, but I don't think anyone has the right to kill because they don't think a life is a good one.