Habits are kinda like mini-addictions. They are just as hard to break free of. I have routines that seem harmless, but I'm thrown for a loop in some cases when that routine is disturbed.
The fact that you called them 'bad' habits means that they are no longer desirable & you wish to stop them. Good. That is an important first step.
A 12-step group helped me to change things in my life that I feel were no longer in my best interest to continue. Try as I might, I was not able to quit these behaviors on my own. I felt that my habits were a personal issue & not to be shared. I was ashamed of them.
There is power in numbers, especially in a roomful of people trying to attain the same goals & over-come similar obstacles.
Listening to how others did it & thinking of how it could apply in my case, #1 made me realize that I was not so unique & alone with the problems as I thought I was after all.
Relate, don't compare yourself to others for the full benefit.
This lifted a lot of shame & self-hatred. Feeling better about myself came gradually.
Looking back, it was like hopelessness did a 180 degree turn into hopefulness.
Early on, I had anxiety that could become panic. I could hyper-ventilate without being aware of it & when my arms & legs went numb & tingly, I thought that I was having a heart attack.
I saw a physician who gave me a thorough exam with lab work to rule out anything physical. I was started on very mild medications to 'take the edge off' along with therapy.
It has been about 35 years since. I am stable & trust my thinking today. I still make mistakes & wish that I did some things differently, but it is nothing like the train-wreck that I once was.
The very best of luck to you.