"One of the hardest decisions you'll ever face in your life is choosing whether to walk away or try harder."
This is the thing, isn't it. Whatever decision you make, you must be all in. You must be committed to trying harder or you must be committed to walking away. No half measures.
I believe you will know when to walk away. You will know in the bottom of your gut.
Most of the time you will need to try harder and just give it 100%. Nobody else will be able to criticise you if you give 100%
Sometimes in life, you will come to this decision. What is it going to be?