Goals and Punishment

I set a goal that is too ambitious for me in order to fail and punish myself. How do I know a goal is healthy for me? How do I chose a goal that is a stretch but I can’t then use against myself to beat myself up?