To lose heart or become discouraged; to be exhausted or worn out, especially in the face of difficulty.
長い試合で彼は途中でへこたれず、最後まで走り切った。
In the long match he didn't give up and ran through to the end.
何度失敗してもへこたれないで挑戦し続けてほしい。
I want you to keep challenging yourself and not be discouraged no matter how many times you fail.
暑さで体力が落ちてへこたれそうだ。
I'm getting exhausted from the heat and feel like giving out.