though my initial self-loathing was certainly due to my upbringing, as an adult i've learned that mercy/forgiveness and failure recovery are skills to be honed like any other.
it can all be very unconscious.
i did x things that hurt or upset people.
im horrible at doing x.
every time i try x it fails.
my romantic advances are always rejected.
i want to be good at x, but im not.
i keep hurting people that i care about.
this can feel like evidence of your shortcomings, and over time it gives you a general lack of satisfaction with who you are. eventually, you may find that you've come to hate yourself.
to be "good" at a thing, you must be good at imperfection/failure, which is actually very difficult. failure doesn't usually feel good, and as a result many people stop trying to do things that they will do imperfectly.
in turn you have to be merciful with yourself and forgive yourself. this is also hard, because when we don't get what we want over and over again, it may feel impossible to forgive ourselves for the perceived shortcomings that deny what we feel will make us happy.
learning to be okay with imperfection, and forgiving ourselves are hard skills to learn, but it is possible. sometimes, medication and/or therapy are needed to help break the innate feelings and thoughts that keep you from progressing past the negative. or, from even locating where the negativity is coming from.
it is okay to be unhappy. it's okay to be unhappy about things that have happened or things you've done. the problem arises when those feelings persist and prevent you from moving forward.
you have to forgive yourself, even when no one else will. that's not a blanket statement about being allowed to do whatever you want.
it's
"i did x thing. i was feeling a certain way, and it became overwhelming enough that i did something im not proud of. im sorry it happened. it was not wrong to feel that way, but it was not okay to do x thing because of it. i didn't want to do it, but i know why it happened. im a human with flaws and mistakes like everyone else. i can improve and move past this"
and you have to
keep practicing it. I think a lot of therapist refer to this as a sort of mindfulness. ideally you get to the point where you can meet your feelings head on before they influence your actions.
even thoughts: "
i thought about killing myself today. im not sure why, but i will acknowledge the thought without letting it dominate my day. maybe something stressful happened, or i thought about something that made me unhappy. thats okay. im allowed to have thoughts and ignore them. if it's hard to ignore, i can exercise curiosity to understand why i am feeling this way"
and similar with thoughts of worthlessness or self-hatred. there is probably a reason you are feeling this way!
https://youfeellikeshit.com/ is also an invaluable resource. it will walk you through a checklist so you can evaluate and see if your feelings are being triggered by a lack of some more base needs being unmet