Generally, situations like this arise when we keep our vision concentrated on the 4 to 5 meters ahead of us. This reduces our time to react and we act instintively. The best is to look as far up the road as possible. This shall give you ample time to react to any situation and you shall see that the frequency of emergency breaking shall reduce significantly.