What most people do of course is VRRP.
Sure, or HSRP or GLBP ... all still doable.
Barring that, you just specify multiple default routers, and the client
will
select the router that still responds to ARP. But support for this is not universal, so.
Indeed, not universal and in fact default behaviors vary wildly.
When that isn't available, what I have done in the past here is to use the DHCP server to give out a default router option that is sorted according to the DHCP relay agent that was used to reach the server (keyed on giaddr contents).
The net result is that the client uses the default gateway which it used to reach the DHCP server, and so will automatically receive an updated value
if
that router fails, as part of DHCP lease rebinding (it will reach the server via the alternate router).
Which I think is pretty slick. OOC - between the "router fails" and "I renew/rebind my address", is the host down and out? So you are accepting either a noticeable outage or tweaking your lease times, yes?