No, it is better to say an act of contrition and get to confession at the next available opportunity. There are several reasons why giving yourself a penance is not a good idea:
If you have a scrupulous conscience, you might give yourself too harsh a penance and then end up feeling worse if you are not able to complete it to your satisfaction.
If you have a lax conscience, you might decide you’ve done all you need to do and skip going to confession.
While it is not unknown for people to take up penances on their own, a penance is something that ordinarily should be received from a confessor—either one he thinks is right for you, or a suggestion from you for which he gives approval.
DISCLAIMER: Catholic Answers has turned over the archive to Catholic-Questions.org and no longer owns, manages, or moderates the forums. For additional apologetics resources please visit www.catholic.com.