Life is complex and blanket dogma such as "never quit no matter what, screw the haters!" is detrimental. There ARE situations when you SHOULD quit. Recognizing those situations may be hard, but it's still worthwhile to consider quitting.
I don't care what fantasy of glory you're trying to chase, but for the love of god please be pragmatic about it and consider the entirety of the situation before making a decision that can impact your life in a big way, for better or for worse.