Westminster Confession 10.3-4

We all know the joy and hope that comes from a new life.  But sadly many have also experienced the grief that comes from the tragic loss of a new life.  When such a thing happens there is often confusion and questions about the eternal home of the child.  In a similar way some have had children that are severely mentally handicapped and either cannot understand the gospel or are so limited that we cannot know if they understand.  Again there is confusion and questions about the eternal home of such individuals.
In chapter 10.3 the Westminster Confession addresses these difficult questions.
-Basically what it says is that those God has chosen to save (the elect) who either die in infancy or are physically incapable of being outwardly called by the gospel will be saved.  God usually calls through his Word and Spirit granting faith in Christ (Romans 10).  But in these cases where that ordinary way of calling is not physically possible he is still free to save.  Yet when he does save such people he still does so by the Spirit renewing and uniting a infant or incapacitated person with Christ.  They are still guilty in Adam (Romans 5), they are justly condemned, and so still very much need to be reborn, forgiven, and accepted in Christ.  We do not therefore accept the idea that infants and young children have no sin before reaching a certain age (sometimes called the “age of accountability”).  Nor do we accept the idea that mentally disabled people are without sin.  If any fallen people are to be saved they must be saved through Christ.
So who are the elect infants and handicapped people who receive this benefit.  Well we cannot know with absolute certainty.  The confession (following the bible) does not necessarily deny that all infants or all incapacitated people for that matter are elect and saved, but nor does it affirm that they are either.
However following what the Scriptures the confession seems to indicate that there is a much clearer hope for the children of believers because certain Scriptural principles can be readily applied to the issue.  So the confession quotes from Luke 18:15, and Acts 2:38 which both speak of the children of believers and God’s covenant promises to ordinarily work savingly in their lives.
Similarly, the Synod of Dort addressed the issue saying that based on the promises of God to be a God to believers and their children believers ought not doubt the election of their children lost in infancy (which would apply also to mentally handicapped or incapacitated children of believers).  The Reformed consensus seems to be that the greatest comfort on this matter is given to believers in the covenant promises of God.  But it does not rule out hope to others.
Handling this in a pastoral situation would be much easier in the case of believers.  I would point believing parents to the covenant promises to them and their children.  I would point them to the example of David in 2 Sam. 12:23 that seems to indicate that his covenant child lost in infancy was saved.  And I would encourage them  not to doubt that their child is with God.  The same is true for believing parents who lose a child whether in infancy or at an older age who was severely mentally handicapped and could not understand the gospel.
Handling this in a pastoral situation where an unbeliever lost a child and came for counsel or where an unbelieving friend or family member lost a child I would not be able to give the same assurance.  I would tell them clearly that the bible says we are born in sin and cannot enter heaven  apart from being united with Christ but would quickly go on to say that it is possible that God has chosen to save all infants dying in infancy.  I would say the bible does not tell us for certain what happens in such situations.  Then I would communicate the gospel to them and call them to repentance and faith in Christ as the only way of Salvation for those able to hear and respond to the gospel.  So I would try to say no more or less than the bible while being sensitive and I would try to share the gospel with them and call them to a response.
In section 4 of the confession goes on to say who may not be saved.
-Those that are not elected by grace for salvation may not be saved because they are not called effectually into union with Christ by the unordinary way already mentioned or in the ordinary way through the outward call of the gospel made effectual by the Spirit.
In fact such people may receive the outward call and even some common operations of the Spirit (they may have some conviction of sin, some conviction of the truth about Christ, be gifted or empowered for some service to God [think of Judas ministering with the other apostles]) but never truly come to Christ in repentance and saving faith.  Such will not be saved.
Furthermore the confession wants to make clear that those not professing the Christian religion cannot be saved in any other way but being called to Christ outwardly and effectually such as they truly come to him.  These are not to be considered in the same category as those physically INCAPABLE of being called outwardly that we mentioned before (those dying in infancy and the severely mentally handicapped).  They Word itself suggests that they must be called by Word and Spirit to Christ if they are to be saved.  So framing their lives according to their own religion no matter how diligent they are only leads to condemnation apart from Christ (Romans 2) and we need to preach the gospel to them (Romans 10).  To maintain that such may be saved through another religion is a position to be detested because it is a virtual denial of the gospel, the necessity of Christ, and the means God has established to bring people to Christ (preaching, evangelism, missions).
Westminster Confession 10.3-4III. Elect infants, dying in infancy, are regenerated, and saved by Christ, through the Spirit,[12] who works when, and where, and how He pleases:[13] so also are all other elect persons who are incapable of being outwardly called by the ministry of the Word.[14]

IV. Others, not elected, although they may be called by the ministry of the Word,[15] and may have some common operations of the Spirit,[16] yet they never truly come unto Christ, and therefore cannot be saved:[17] much less can men, not professing the Christian religion, be saved in  any other way whatsoever, be they never so diligent to frame their lives according to the light of nature, and the laws of that religion they do profess.[18] And to assert and maintain that they may, is very pernicious, and to be detested.[19]

Scripture References

[12] LUK 18:15 And they brought unto him also  infants, that he would touch them: but when his disciples saw it, they  rebuked them. 16 But Jesus called them unto him, and said, Suffer little children to come unto me, and forbid them not: for of such is the  kingdom of God. ACT 2:38 Then Peter said unto them, Repent, and be  baptized every one of you in the name of Jesus Christ for the remission  of sins, and ye shall receive the gift of the Holy Ghost. 39 For the  promise is unto you, and to your children, and to all that are afar off, even as many as the Lord our God shall call. JOH 3:3 Jesus answered and said unto him, Verily, verily, I say unto thee, Except a man be born  again, he cannot see the kingdom of God. 5 Jesus answered, Verily,  verily, I say unto thee, Except a man be born of water and of the  Spirit, he cannot enter into the kingdom of God. 1JO 5:12 He that hath  the Son hath life; and he that hath not the Son of God hath not life.  ROM 8:9 But ye are not in the flesh, but in the Spirit, if so be that  the Spirit of God dwell in you. Now if any man have not the Spirit of  Christ, he is none of his.

[13] JOH 3:8 The wind bloweth  where it listeth, and thou hearest the sound thereof, but canst not tell whence it cometh, and whither it goeth: so is every one that is born of the Spirit.

[14] 1JO 5:12 He that hath the  Son hath life; and he that hath not the Son of God hath not life. ACT  4:12 Neither is there salvation in any other: for there is none other  name under heaven given among men, whereby we must be saved.

[15] MAT 22:14 For many are called, but few are chosen.

[16] MAT 7:22 Many will say to  me in that day, Lord, Lord, have we not prophesied in thy name? and in  thy name have cast out devils? and in thy name done many wonderful  works? 13:20 But he that received the seed into stony places, the same  is he that heareth the word, and anon with joy receiveth it; 21 Yet hath he not root in himself, but dureth for a while: for when tribulation or persecution ariseth because of the word, by and by he is offended. HEB  6:4 For it is impossible for those who were once enlightened, and have  tasted of the heavenly gift, and were made partakers of the Holy Ghost, 5 And have tasted the good word of God, and the powers of the world to  come.

[17] JOH 6:64 But there are some of you that believe not. For Jesus knew from the beginning who they  were that believed not, and who should betray him. 65 And he said,  Therefore said I unto you, that no man can come unto me, except it were  given unto him of my Father. 66 From that time many of his disciples  went back, and walked no more with him. 8:24 I said therefore unto you,  that ye shall die in your sins: for if ye believe not that I am he, ye  shall die in your sins.

[18] ACT 4:12 Neither is there  salvation in any other: for there is none other name under heaven given  among men, whereby we must be saved. JOH 14:6 Jesus saith unto him, I am the way, the truth, and the life: no man cometh unto the Father, but by me. EPH 2:12 That at that time ye were without Christ, being aliens  from the commonwealth of Israel, and strangers from the covenants of  promise, having no hope, and without God in the world. JOH 4:22 Ye  worship ye know not what: we know what we worship: for salvation is of  the Jews. 17:3 And this is life eternal, that they might know thee the  only true God, and Jesus Christ, whom thou hast sent.

[19] 2JO 1:9 Whosoever  transgresseth, and abideth not in the doctrine of Christ, hath not God.  He that abideth in the doctrine of Christ, he hath both the Father and  the Son. 10 If there come any unto you, and bring not this doctrine,  receive him not into your house, neither bid him God speed: 11 For he  that biddeth him God speed is partaker of his evil deeds. 1CO 16:22 If  any man love not the Lord Jesus Christ, let him be Anathema Maranatha.  GAL 1:6 I marvel that ye are so soon removed from him that called you  into the grace of Christ unto another gospel: 7 Which is not another;  but there be some that trouble you, and would pervert the gospel of  Christ. 8 But though we, or an angel from heaven, preach any other  gospel unto you than that which we have preached unto you, let him be  accursed.