Lately i just lost but it's making me see my mistakes and you gave up when victory does not come.
It's only a good thing that you are able to see your own mistakes. Bad players tend to blame everyone else for their losses when good players analyze if they did something wrong themselves. Bad players don't learn anything from losses and continue to play the same when good players turn that loss into profit later on by avoiding those same mistakes they once did.
My own play after losing depends on what has happened. If I lose to a cooler or to a horrible bad beat, I might still continue if I have played my cards right. Then again, if I start to lose because of my own behaviour like starting to tilt, already tilted or just generally making bad decisions, I quit. I accept the fact that I didn't do so well this time and start again tomorrow with a fresh state of mind. Everyone can probably notice when they start to tilt or when they play bad but not everyone can stop playing after that. In the end, that's what makes a huge difference between winning and losing players.
My maximum loss during one session is probably 3 buy-ins and that is something I don't ever want to exceed. Usually I quit after losing 2 buy-ins no matter what, even when I have played well. It's just not my day then.