switch load depending on battery voltage
The function that you describe is commonly performed by a comparator circuit which typically a specialized version of an op-amp. The circuit works by comparing the monitored voltage to a reference voltage (typically from a zener). When the voltage falls below the set point that is programmed with a simple resistive divider network, the output of the comparator changes state.

The ability of a comparator to change state at one voltage but not revert back until a higher (or lower as the case may be) voltage is measured is called hysteresis. You have asked for 1.2 volts (4.0 - 2.8 volts) of hysteresis although you could probably get by with much less hysteresis.

In your case the comparator circuit must at all times be powered by the battery it is trying to protect so you need a very low power comparator. The output of the comparator could drive a MOSFET switch that disconnects the load from the battery when the comparator trips.

There are many low power comparators on the market, some of which are integrated into brown out protection devices and other special functions. Take a look at the spec sheet for the LTC1540 (here). This is an ultra low current device that includes the zener voltage reference source and it can operate down to a 2 volt supply. This IC with two divider resistors and a MOSFET should suit your application.