Contrary to what you might have been told, Lent does not mean “40 days of beating yourself up.” It does not even mean “40 days of God beating you up and reminding you of what kind of a person you really are.”
Lent means spring.
Lent is short for “lengthen.” Someone, somewhere noticed that (at least in this hemisphere) the season of Lent was accompanied by the lengthening of the days.