Thank you for sharing your heart so honestly. Hearing that you are going to treatment, that you feel trapped, and that you long to come home again shows a real desire for change, and your words that you can trust God are the most important place to begin.
The Bible teaches that without God we are without hope in this world. There is a real separation between us and God because of sin, and apart from Christ there is no lasting hope. But when Jesus came and gave His life and rose from the dead, He opened the way for us to be brought near to God. That is why our hope is called a living hope. It is not a wish, it is anchored in the resurrection of Jesus Christ and in the promises God has given us. Because God has done this, your faith and your hope can be in Him alone.
God gave us the Scriptures for our learning, so that through patience and comfort from His Word we might have hope. One reason we need patience is that God is patient. He is long suffering and faithful to bring His purposes to pass, even when it seems to tarry. The prophet was told that though the vision tarries, wait for it, because it will surely come. In the same way, God wants to fill you with joy and peace as you trust Him, so that you may abound in hope. That hope sustains us while we wait for what we do not yet see.
I understand the helpless feeling you describe when you feel trapped with no way out and no solution in sight. Many have felt that their strength and hope had perished and have remembered only affliction and misery. When our eyes are fixed only on our situation and on our problems, we lose heart. When we turn our eyes to the Lord and remember that His Word is true and that He is faithful and compassionate and full of mercy, our outlook changes. His love for you does not come and go. He does not love you only when you do well and turn from you when you fail. His love remains constant, and He desires what is best for you. It is never foolish to turn toward Him, it is foolish to run from Him.
Going to treatment can be a helpful step, but treatment itself does not solve every problem. Only God can do the deeper work in the heart. He can use this season to prepare you, to refine and purify you as gold is refined, and to teach you to rest in Him even in uncomfortable places, trusting that He will use even hard things for your good and His glory. He created us with a thirst that only He can satisfy, and Jesus invites anyone who thirsts to come to Him and drink. When we come to Him we do not ask for justice, which is what we deserve, but for mercy, and He is merciful. He separates our sins from us as far as the east is from the west and gives us a new standing as His children. This life in the body is like living in a tent, temporary and frail, but God promises a building not made with hands, eternal in the heavens, and the hope of eternal life for all who trust in Christ.
So keep waiting on the Lord and keep your hope in Him. Be of good courage as you wait. Let His Word comfort you each day, and keep yourself in the place where you can experience His love. Pray and ask Him to do His work in you and to prepare you for what He has ahead.
I am praying for you, that the God of all hope will fill you with all joy and peace as you trust in Jesus, that you will know His compassion and faithfulness in a fresh way, that He will give you strength and wisdom in treatment, that He will provide the way home in His timing, and that your life will be built on the living hope we have through Jesus Christ who was raised from the dead.