Self-punishment, whether of a charitable or puritan kind, is not enlightenment (if one accepts my definition of enlightenment as involving care for others and oneself - Meaning of Enlightenment).
I should know for having been in the past exceedingly and insanely hard on myself and suffering mentally and emotionally as a result.
Giving all your resources away may be charitable and noble but if this results in your own personal suffering then I would not regard that as being enlightened.
Similarly, being overly hard on oneself for perfectionist reasons is still not taking care of oneself.
And just because others are suffering does not mean you have to suffer as well.
It could be argued, moreover, that one needs to take care of oneself before being in a position to take care of others.
For you cannot care for others, or at least give them quality care, if you yourself are in need of care.
This is perhaps the insight that consciously or unconsciously made Nietzsche balk at Christian forms of self-flagellation for the sake of neighbourly compassion and making him as a result the most anti-Christian thinker in history.
Perhaps a healthier way to view one's neighbour and by that I mean the vast majority of humanity is to care but not care.
Show enough care so as to be moral and not an arsehole but don't care in so far as don't ever expect miracles to happen when it comes to humanity's varying levels of consciousness and morality.
In fact I have found that having low expectations with regards to people has helped increase the amounts of pleasant surprise I have experienced in my interactions with them.