Car loses power in scary situations

My 2000 Toyota Corolla, automatic, loses power when I decelerate after driving for a short distance when I am enterring the freeway and trying to accelerate on the ramp and then into traffic. The car never dies or turns off, but loses power and “coasts”; as I coast along and try to get out of the traffic, I press the accelerator pedal almost to the floor and within 5-10 seconds the car will roar to life and accelerate like it’s getting all the power it needs. That’s usually the end of it for that day…however, there is often some hesitation as I continue driving. This doesn’t happen all the time, but almost always when it’s been outside all day and the temperature has been at freezing or below…usually when my car has sat all day while I’m at work. My mechanic hasn’t had time to look at it yet but has suggested perhaps a bad switch of some kind or maybe a dirty switch. Also, this may be unrelated, but often before this happens the brake light will sometimes come on and stay on…even though the brake isn’t on, nor has it been on while parked. This never has happened in the mornings after my car has been in the garage all night.

For the brake light, have you checked your brake fluid level?

The engine’s dying. The transmission is still engaged, and so the engine is still turning, but it’s using the kinetic energy of the car to do so rather than making its own power. Look at fuel and spark.

Sounds like a classic fueling issue to me. YOu may havea dirty or clogged fuel filter. The fuel pump is having a hard time pushing fuel through the filter element. It either that or you might have a bad fuel pump relay, it may be cycling on and off your fuel pump unbeknownst to you when exactly its happening…if that were happening you would have the problem you described. Try a new fuel filter first…very easy to change and inexpensive just as a first step. Thats where i would go first. Then again, Id hookup my fuel pressure gauge to it and rout it outside the hood so I can see what psi I am getting while it is running properly and also what psi you get when the issue is present. But thats just me, I understand not everyone has the tools that I do from a LIFETIME of working on cars and motorcycles. So far I have 25 years under my belt.