Scripture does not use the word gambling. Peace with God after a loss or a habit comes by confessing sin and trusting the forgiveness God gives in Christ. Philippians 4:7 says the peace of God shall keep your hearts and minds through Christ Jesus. That peace does not repay the loss.
If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness.
Ask Bible Copilot about this topic
Can a person who has gambled have peace with God?
The Bible does not use the word gambling, and it never blesses staking money on chance. It does speak to guilt. "If we confess our sins, he is faithful and just to forgive us our sins, and to cleanse us from all unrighteousness" (1 John 1:9, King James Version). Peace with God in that verse is forgiveness and cleansing. It is not a feeling that the lost money will return.
This page asks about peace with God after the shame. A different question, how Scripture speaks to the habit itself, is answered in how the Bible helps with gambling. Those two questions should not be collapsed. Forgiveness is not a plan for beating the habit, and a plan for the habit is not the gospel.
What does the peace of God in Philippians 4 actually keep?
"Be careful for nothing; but in every thing by prayer and supplication with thanksgiving let your requests be made known unto God. And the peace of God, which passeth all understanding, shall keep your hearts and minds through Christ Jesus" (Philippians 4:6-7, King James Version). "Be careful for nothing" means do not be anxious. The peace of God keeps the heart and the mind through Christ Jesus. Paul writes this as a man who has learned contentment in want: "I have learned, in whatsoever state I am, therewith to be content" (Philippians 4:11, King James Version).
Do not import Joel 2:25. "And I will restore to you the years that the locust hath eaten" is the LORD's word to Judah about the locusts he sent. It is not a promise that God will repay gambling losses. The peace of God is also not the relief of a winning night. Jesus says, "Peace I leave with you, my peace I give unto you: not as the world giveth, give I unto you" (John 14:27, King James Version).
Does that peace cancel debts, trust, or the urge?
No. Confession does not claim that debts, broken trust, or the pull of the habit have vanished. "Let your conversation be without covetousness; and be content with such things as ye have: for he hath said, I will never leave thee, nor forsake thee" (Hebrews 13:5, King James Version). The promise in that verse is contentment and God's presence. A loss can still be on the books in the morning.
"Thou wilt keep him in perfect peace, whose mind is stayed on thee: because he trusteth in thee" (Isaiah 26:3, King James Version). Isaiah is speaking to a people who are told to trust the LORD, not to a method for making consequences disappear. A stayed mind is not the same thing as a repaired bank account.
What should be done with the shame?
Tell the truth to God, as 1 John 1:9 says, and do not treat secrecy as safety if the habit has a hold. "Bear ye one another's burdens, and so fulfil the law of Christ" (Galatians 6:2, King James Version). Help from another person does not earn forgiveness. Forgiveness rests on God being faithful and just. Carrying a burden together is obedience to the command in Galatians 6, not a second way to be saved.
If the fear underneath is daily need, read what the Bible says about provision. Philippians 4:19 speaks of need in the setting of a gift to Paul. It is not a reason to try to win the money back. Peace with God can be real while restitution, honesty, and a long fight with the urge are still in front of you.