A sister on the West Coast writes that 40 years ago, as a practicing nurse, she witnessed the spontaneous delivery of a baby, and the infant died within minutes. Sensing the situation, she reached for a cup of water and poured it over the baby’s head to baptize it before it died. Was that baptism valid, she wonders, since it was not immersion and since she did not consider herself a Christian at the time?
Since you then were not a Christian yourself, I am curious why you even thought to do what you did. Was the motive superstitious or mere cultural impulse? Or was it related in your mind to trust in Christ and what he did for us by his life, death and resurrection? The Bible does not suggest that God notices those first motives, but it does indicate that he is mindful of the second and that he regards with favor the heart which acts on that basis.
No matter what your state of mind, I know no reason to suppose the baby needed baptizing to begin with, since the New Testament always relates baptism to the faith or repentance of the person who is being baptized. I have to presume that the baby had neither. I also believe that this dying infant was covered by Christ’s atonement without faith, repentance or baptism, since it had never consciously rejected God’s fellowship and grace in any form. In that case, the baby was neither better nor worse before God as a result of your well-meaning activity on its behalf.
This makes your original inquiry moot, of course. Were we to change the scene to include a person who trusts in Jesus’ atonement and who wishes to express that faith by obeying Jesus’ command to be baptized in water, we could restart this conversation in another direction, but that was not the situation about which you inquired.