Republican Ted Cruz, seeking to change the course of his flagging presidential campaign, on Wednesday named Carly Fiorina as his running mate as he tries to slow the march of Donald Trump toward the party’s nomination.

The announcement came a day after big losses in five northeastern states dealt a severe setback to the Texas senator’s chances of overtaking the GOP front-runner. Mr. Cruz is betting that Mrs. Fiorina, a former Hewlett-Packard Co. chief executive who ran for president before dropping out in February, will help...