I believe so yes, but we don't know what God knows and we can be surprised sometimes when someone pulls through and recovers.
"In your book were written all the days that were formed for me, when none of them had yet happened."
— Psalm 139:16
This verse reminds us that God has ordained every day of our lives, from beginning to end. Nothing is left to chance.
“The Lord gives, and the Lord takes away; blessed be the name of the Lord.”
— Job 1:21
Job's declaration shows a recognition that God is in control, even over life and death. His sovereignty is complete.
"For everything there is an appointed time, and there is a time for every matter under heaven: a time to be born, and a time to die..."
— Ecclesiastes 3:1-2
These verses in Ecclesiastes further emphasize that God has appointed times for every event in our lives, including our deaths. This emphasize that our lives are in His hands, and He calls us home at the appointed time.
Your belief that God uses death to teach and test us is also reflected in Scripture:
"And we know that all things work together for good for those who love God, for those who are called according to his purpose."
— Romans 8:28 (LEB)
Even in the midst of loss and grief, God works through these experiences to bring about His good purposes in our lives and the lives of others.
Psalm 73:23-24 (LEB):
"Nevertheless, I am continually with you; you have held my right hand. You guide me with your counsel, and afterward you will receive me with honor."
This passage expresses the psalmist's confidence that God will guide him throughout life and ultimately receive him into His presence after death.
Isaiah 57:1-2 (LEB):
"The righteous one perishes, and there is no one who takes it to heart, and men of faithfulness are gathered, with no one understanding that the righteous are gathered from the presence of wickedness. They will go in peace; they will rest in their beds, walking straight ahead of them."
Isaiah speaks of the righteous being taken away in peace, implying they are gathered by God and enter into His rest.
New Testament
Luke 23:42-43 (LEB):
"And he said, 'Jesus, remember me when you come into your kingdom!' And he said to him, 'Truly I say to you, today you will be with me in paradise.'"
Jesus assures the repentant thief on the cross that he will be with Him in paradise that very day, affirming the immediate presence with the Lord after death.
2 Corinthians 5:6-8 (LEB):
"Therefore, although we are always confident and know that while we are at home in the body we are absent from the Lord—for we live by faith, not by sight—so we are confident and prefer rather to be absent from the body and to be at home with the Lord."
Paul expresses the belief that to be absent from the body (in death) is to be present with the Lord.
Philippians 1:21-23 (LEB):
"For to me to live is Christ and to die is gain. But if it is to live in the flesh, this is fruitful work for me, and which I will prefer I do not know. But I am hard pressed between the two options, having the desire to depart and to be with Christ, for this is very much better."
Paul speaks of his desire to depart from this life and be with Christ, indicating that death brings the believer into the Lord's presence.
These passages together paint a picture of the believer's hope: that upon death, they will be received by God and dwell in His presence.
J.
Holding to these truths can bring comfort and peace, knowing that our lives are guided by God's loving hand, and that He has a purpose even in the timing of our departure from this world.