Democrats had outraised and outspent him by millions of dollars in trying to pull off a race in a reliably GOP district.