I found this post and the following two posts as a trilogy designed to answer an often asked question. As the father of a daughter who died in infancy, I’ve had peace about this matter because of the Scriptures that the Holy Spirit led me to in my search for answers. Still, Jesse Johnson provides a comprehensive discussion on this issue for which answers seem elusive. As Jesse has observed in his discussion, I would encourage you take into consideration the weight of the entirety of the discussion rather than pick on one passage or another.
I believe that you will be encouraged when considering the heart of God through the various passages and accompanying discussion by Jesse.
Jesse’s first article on this topic is below:
My wife and I were camping when we got a phone call that a friend’s infant child was in a hospital nearby, and was not likely to live. We came out of the mountains and rushed to the hospital, where…
Source: What happens to infants who die? The need for an answer