Honda Accord Nearly Stalling

I have a 2000 Honda Accord EX, six cylinder, 109,000 miles. Sometimes the car nearly stalls when shifting into drive. Usually, this happens when backing out of my driveway on to the street. The point at which it almost stalls is when I shift in to drive. This only happens when the car is cold. In the past, in the winter months, sometimes the car will also rev very high (3000 RPMs) until it is warm.