Many people have, through their own efforts to get up and try again, been able to turn around their lives. People who give up tend to descend farther and farther.
Trying to fix problems after mistakes have been made is the sign of someone who is capable of learning from their mistakes and doing better. The person who loses motivation because things are bad is the one they will get rid of faster because there is no hope of fixing that person.
And attitudes tend to solidify with age and with repeated use. It is easier to change a negative attitude (such as a tendency to give up) the younger you are. So if you let problems demotivate you, then you will fail repeatedly until you can no longer envision success. You will fall harder and faster than the person who doesn't lose motivation. This is not in your own best interests.
Life is hard. Everyone has problems and everyone has challenges to overcome. If you don't try to overcome them, then you are the one who loses the most.