In all likelihood Ted has also cost himself his Senate seat in 2018 as well. The establishment hates him and will be all in to get that seat back. He’ll be primaried and probably by several candidates to force a runoff. If he survives, he will need to win a general with a party probably hostile to him. Ted would do well to drop out soon, then suck up to future President Trump and look for an AG or SC nomination.
The Texas establishment hated him in 2012. Most of us Texans love him.