Hey, buddy! I know how you feel, the whole insomnia thing is really quite grating. You've had emotional hang-ups and low self-esteem before, and you're always thinking about things, but the fact that you've been able to come out of it on your own and shake off those negative states definitely deserves a lot of credit, and it shows that you're super resilient at heart. However, insomnia seems to have become a little tail, always pestering you, even if your mind is empty, you can't fall asleep until the middle of the night, which is a real headache.
Insomnia is a complicated matter. Sometimes we think we don't want to do anything, but subconsciously we may be harboring some anxiety or stress, so that our body can't relax and fall asleep. First of all, try to fix the routine, try to go to bed and get up at the same time every day, and don't be lazy on weekends, this will help you adjust your biological clock, so that your body can get used to the regular rhythm of sleep.
It's also crucial to make your sleeping environment comfortable. Keep your bedroom quiet, a little darker, at a moderate temperature, you can use blackout curtains, earplugs or a white noise machine to block out distractions, and pick a comfortable mattress and pillow, and the quality of your sleep will improve quite a bit.
You have to be careful about what you eat as well, keep caffeine and alcohol to a minimum, and try not to drink coffee, tea or carbonated beverages in the afternoon and evening. Alcohol, while relaxing you momentarily, can disrupt deep sleep, so it's best to avoid it.

It's super important to get into the habit of relaxing before bed, like reading a relaxing book, doing yoga, meditating, or taking a hot bath. These little things slow down the mind and body and prepare it for sleep.
Also, look at fewer screens before bed and keep your phone, tablet or TV away from you, as blue light can suppress melatonin production and affect your ability to fall asleep. Try turning off your devices an hour before bedtime to give your brain a break.
If you lie in bed or thoughts flying, may wish to write before going to bed the day's troubles and tomorrow's plan, the distractions empty, the brain is much easier.
If all of these methods have been tried and not worked, consider talking to a psychologist or sleep specialist. They can help you analyze in detail and recommend professional treatments like Cognitive Behavioral Therapy (CBT). Exercise can also improve your sleep, but remember not to do strenuous exercise before bed, lest your body is too excited to sleep instead.
Breathing and meditation techniques may be useful, and although you find deep breathing to be generally effective, try it with meditation or progressive muscle relaxation. Breathe slowly and deeply while relaxing your whole body and you may be pleasantly surprised.
From what you've experienced, you already have strong self-regulation skills, which is super awesome! The fact that you've managed to overcome your emotional problems shows that you're good at problem solving. Now, put this wisdom to work in curing insomnia, and you're sure to find a method that works for you.
Remember, everyone is different, try more than one method, there is always one for you. I hope these tips help you, and I wish you a good night's sleep soon, and an energized life~!