Brake and idle problem

I have a 1997 S10 4.3L 4x4 and the engine idles real rough and just shakes until you give it some gas then runs fine.Good pick and runs down the highway fine. Also when it is idling when you step on the brake pedal it almost kills the engine and pedal is hard as a rock. You can feel the pedal come up when you start it so the booster is working and fluid levels are up
0