The potion is called the Drink of Despair. Its effects are the same as the presence of a Dementor, apparently. Drinking the potion makes آپ live again the worst memories آپ may have. Besides, it seems to have a weakening side-effect on the body that ingests it.
In HBP, only Dumbledore drank of it. Harry was there to give it to him. He did not drink of it.