The former state senator, who was endorsed by President Trump, spent millions of dollars of his own money on the race.