How to not give up on doing exercizes? I've been lifting weights for half of a year or so to become healthier, stronger and overcome depression but gave up flushing my progress
What's worse is that it was not the first time happened
You have to find out why you gave up.
In terms of lifting: Did you stop making progress on specific lifts? Did you do lifts you didn't like? Did you do lifts that hurt your joints?
In terms of nutrition: Are you fat? Are you skinny? How is your macros profile? How is the quality of the food you eat?
In terms of recovery: Do you sleep well? Do you sleep enough? Do you take any supplementation?
Maybe you are doing too much volume. Try to lower the number of sessions, sets and/or reps per body part and leave one rep in reserve when you do them (>4 sessions, >8 sets per body part per session, >15 reps per set). You don't have to do the big 5 lifts (Deadlift, Bench, Squat, OHP, Rows) to grow or become strong, maybe choose one or two of them and switch to machines and DBs for the rest of the body parts. Above all, write your program down, and choose exercises you actually like.
If you are skinny, maybe you are not eating enough. Try upping your calories and protein and fat intake. Try eating a variety of healthy foods. Same applies if you are fat, but lower your calories and fats, plus, start recording the foods you eat, with their calories and macros, your weight, and try to slowly lowering those numbers over time.
Get some good sleep! If you snore, sleep on your side. Try taking some melatonin (hormone that makes you sleepy) a couple of hours before you go to sleep if you have trouble falling asleep. Take creatine, even if you don't lift; it makes you feel less tired, and makes you concentrate better (it's literal magic). You could also take some multivitamin to have some bases covered (if you don't usually take in sunshine, and eat fruits and veggies, etc, it comes in handy)
Even with all of the above covered, if you have some type of actual depression, lifting won't solve it. It will help, but it won't solve it. You have to find out why you have depression. Get rid of the obvious vices (masturbation, smoking weed, taking drugs and/or alcohol, etc), go to a psychologist to get a proper diagnosis, and go to Church (you'll get a social circle of good quality people, and you will grow in virtue and God will help you).