Wear sackcloth and ashes

To behave in a way that shows that you are very sorry for something that you have done wrong in ancient Biblical times people wore very uncomfortable sackcloth (cloth for sacks) for mourning and also to repent for something that they did wrong.

The politician was forced to wear sackcloth and ashes as an apology for his wrongdoing.