Never give up can work, but only in cases where someone lives a happy and a normal life. Of course it is possible to follow an advice like this if you are a person like that.
However, what I do not like is when phrases like these are generalized and then offered to people in situations in which they could not possibly be followed as advice. And on top of that, words like these are offered by exactly the kind of people who do not understand or cannot imagine another person's horrible situation because they themselves are living a happy and a relatively comfortable life.
Yes, someone with a smile on their face can easily say to others never to give up, and no doubt would it work for them. But I would like to see such a person following their own advice if they got a horrible, everlasting and an unsolvable problem making their life unbearable every day.