Yes focusing on deep breathing helps me as well, and overall have a productive day. Do the things that you've been putting off, chores, do things ahead of schedule, work out, meal prep, etc. Replace your old habits of masturbation and porn and replace them with good ones and you'll be tired enough to sleep come the end of the day. If possible, make a routine in your day with a regular sleep time as well, and your body will get used to sleeping at the same time every day.
I've not slept since I last PMO'd 3 days ago before setting my counter when I signed up here. I doubt I'll sleep again. I'm seeing things. But I am NOT PMO'ing, no matter what.
It's not a terrible idea to get some melatonin or prescribed drug to help you sleep for now. Get in a sleeping routine with it, as in everyday for a couple weeks, and then slowly get off of it until you don't use it anymore. People are scared to use a drug to help them sleep since they're scared they might rely on it so that they can sleep, but as long as you control yourself without it, it can be very helpful. It's quite common that doctors prescribe it with more or less the same instructions to many people who have problems sleeping, be it due to insomnia, some emotional event, depression, or withdrawals from some sort of addiction. But sleep is important for your health and healing. Part of the rebooting process involves rewiring your brain, which won't happen much if you don't allow for your brain to rest.
Sleep helps your brain reboot. While your body sleeps, your brain doesn't, but it does clean up all the random inputs it has received and stored. Your body needs the rest, and your brain needs a break from constant input from our senses to refile everything. Be nice to your brain, and it will do good work for you.