50mph ... red traffic light...wasnt paying attention...hit quick the brakes....automatic transmission downshift to first gear...car dies...

Turn switch off and back on and car starts again and i keep on moving...
Its been doing this lately but only when suddenly i have brake and as soon as it stops it shuts off.
Any ideas?
thanks in advance,
'95 Contour GL 4 Cyl. A/T 170K miles.