Giving up hope is one of the tactics of the Yetzer Hara to trap you in his net, making you feel as though you cannot win. However, this goes against our belief that Hashem enables us to overcome the Yetzer Hara.
https://www.torahrecordings.com/rebbe/igroskodesh/011/008/3486