Hi Rash,
Yes, you can set up network (Performance Layer4 / FastL4) virtual server or a default route which points a pool of gateways. On the gateway pool, you can use a monitor which marks the pool members up or down based on the result of an ICMP check of a routed host. This is described in SOL7015:
SOL7215: Configuring multiple default routes on the BIG-IP system
https://support.f5.com/kb/en-us/solutions/public/7000/200/sol7215.html
and
SOL8971: Creating transparent ICMP health monitors
https://support.f5.com/kb/en-us/solutions/public/8000/900/sol8971.html
One advantage of using the VIP is that you can configure destination address persistence to ensure multiple requests to the same destination are sent out the same link. Or you can use priority groups to ensure one gateway is always unless it is marked down.
Aaron