I take it you have EFI... when my 22re did this... i tried everything and nothing worked until i noticed in the fsm and chilton manual that there is a wire coming in to the ecu that is described as brake s/w... every time you push in the brakes... your brake light switch under the dash sends a signal to the ECU for some type of decel cycle as mentioned by Wristpin and pluton. What i did is carefully pull that lead from the main plug that plugs into the ECU.. so when the brake light switch is engaged... that signal doesn't make it to the ECU that causes the fluctation in idle. This may be the cheap way out or the cheap way of fixing things but it worked for me. Dont unplug your brake light switch though... you won't have brake lights.