IAC or idle air control valve possibly. They like to gum up with carbon and not work properly.

When it dies while driving, is it when you foot is off the gas?