"Throw in the towel" is a way to say you have given up.