punish (someone or oneself) for (something)
To penalize or discipline someone or oneself for some crime, wrong, mistake, or other transgression. Bob punished himself for breaking his diet over the holidays by only eating vegetables for two weeks straight. I feel like this heavy workload is the boss's way of punishing me for disagreeing with him during the meeting.
Farlex Dictionary of Idioms. © 2022 Farlex, Inc, all rights reserved.
punish someone for something
to discipline someone for [doing] something. Someone will punish you for what you did. Please don't punish me for doing it. I'm sorry.
McGraw-Hill Dictionary of American Idioms and Phrasal Verbs. © 2002 by The McGraw-Hill Companies, Inc.