One of the reasons people go back to gambling is because they are chasing their losses. You can probably identify with this - it's one of the "gambler's fallacies" - that you can win back the money you have lost.
The antidote to this lie is to accept that you have lost the money you have poured into gambling. This is often really hard to accept. But if you don't accept it, it will be a worm which wriggles its way back into your mind.
One good technique to help you put your losses to bed is to write out how much you've lost. You may not know how much you've lost, but give it your best guess. Write it in the biggest piece of paper in the thickest pen you can find. Then tear it up, or burn it, as a symbolic act.
That money is gone, and you won't see it again.
You will find this is a real release for you, and you can start to build again, from scratch, on a firm footing.
Other self help strategies