Mears gives up politics after defeat