why does my truck cut off when I apply the break on 1997 Ford Expedition

The battery keeps going dead but whenever the truck is started it idles high as if the gas is being pressed. When in another gear if I press the break it cuts right off

We could only guess without further testing, and guessing could lead you in the wrong direction.
Is it possible it could be the coils gone bad? I've had people tell me the coils, the air filter, the spark plugs need changing. Is any of these possible
If the coils are bad, it would be missing really bad, plugs would be the same way. When brakes are pushed, there could be a problem with the vacuum, which could be causing the high idle. It could also be a situation with the electrical, have had that as well with Ford trucks.