Getting beaten was always a sign.
You were born lucky, grew up entitled and in a privileged society but yet ended up like this.
Ur mindset needs some fresh perspectives.
Get out of ur safe zone, go visit some poor country, visit their slums, see how thousands of people struggle to survive just with 1 meal a day and not knowing if they have food for tomorrow.
But they carry on, some despite all sorts of hardships has managed to thrive and surpass it.
They had nothing, no education, many without houses, no clean water, not even electricity, etc but just surviving on sheer willpower and the belief that they shall overcome.
But you, with all that's available in ur society can think of such thoughts of ending it all.
Perhaps you need to 1st learn on how to feel shame.