I would encourage Christians who lose a loved one with the fact that we usually don't know what happened between a person and God in the hours, or minutes, or even seconds, before life is done. I'm confident that Heaven has many people in it whom the Lord snatched like a stick out of the fire. The thief on the cross became a saved person in his last moments of life, and the same possibility exists for anyone. Luke 23:43. So, there is always hope of that having happened.
I think it's also important to believe in God's fairness. When Abraham was negotiating with God regarding Sodom's judgment, he said, "Far be it from You to kill the righteous along with the wicked, treating the righteous and the wicked alike. Far be it from you! Will not the Judge of all the earth do right?" (Genesis 18:25). Abraham knew something about God that is very important. God will not treat any man or woman unfairly. Even though this truth is not like the rejoicing we experience over a soul saved, that confidence in God's integrity is important.
God also deals with people individually. He once said to Ezekiel, "Every soul is Mine" (Ezekiel 18:4). I think this is important because it's in my nature to think of someone as my mother, my father, my sister, or my friend. But to God, that person's most important relationship was to Him. God made them for Himself (Romans 11:36, Colossians 1:16). God, as God, has a special claim on that person which supersedes everyone else.
I think it also matters quite a bit that God finds no enjoyment in passing judgment on anyone. He said this clearly, forcefully, in Ezekiel 18:32. He showed it with tears in Luke 19:41. God is no monster. He judges because He's righteous. God is love, even in His role as Judge.
This truth strongly implies that God doesn't cause anyone to sin. For instance, God says forcefully about the Hebrews, "They built the high places of Baal in the Valley of the Son of Hinnom, to offer up their sons and daughters to Molech, though I did not command them, nor did it enter into my mind, that they should do this abomination, to cause Judah to sin." (Jeremiah 32:35). The Hebrews' sins were entirely their own doing.
God didn't sovereignly, irresistibly cause them to sin, and then play-act that He was appalled. God's relationship to sin is that He ordains it (in the sense that it's part of His over-all plan) but He doesn't cause it (James 1:13-14). In other words, God didn't cause my non-Christian loved one to be unbelieving; God didn't cause my loved one to die in unbelief.
We can't force anyone to repent and believe in Christ, and the passing of a non-Christian loved one reminds us of that. We share in the apostle Paul's unhappiness over the stubbornness of blood kin (see Romans 9:1-3). The Lord wants us to do what we can in this life, even if that's limited to prayer, and then we trust that God, being God, will always do the right thing.