You see, I have tried this technique in the past with no fruitful results, and it is countereffective many times because once you see how much you have lost, you would want to gamble more to recover them back

that's how it all works, because you would stop for a moment or so thinking about your loss and then when the urge will come again, the same resistance will act as a fuel to further gamble xD
You had it on point, I don't think we really need a loss tracker because you unconsciously want to win back all the losses or just a break even. I you want to stop gambling try to change some of your habits, even miniscule habits can help like brushingyour teeth with the opposite hand that you are comfortable with, you will in turn develop some self-discipline and that will surely affect your urge to gamble. Add visual cues to unconsciously remind you of doing something.