I've lived with ADHD for about half of my life. You may or may not have ADHD, but what you're describing sounds pretty similar. Here're a few things I do.

0. Rexamine physical health. In the past two years, I have been diagnosed with sleep apnea and low testosterone (I'm a guy). Having those two treated has been almost miraculous. The ADHD is still very real, but I find I can fight the inattentiveness if I've had a good night's sleep. (And, I guess not coincidentally, a good night's sleep for me is between 6 and 7 hours on a CPAP. I can rarely make it to 8 hours. Again, the ADHD is real.) I've also been examining my diet, my weight, my activity level and other physical changes I can make.

1. Be constructively self-critical and responsible for your actions, but not self-destructive. I shouldn't accept failure from myself due to lack of attentiveness/motivation, but that's not a license to tell myself that I'm an intrinsically, irredeemably bad person. This may be a cliche in SV, but with ADHD or the feelings you're describing, every failure really is a learning opportunity. Your feelings of lack of motivation are not anyone else's fault, but they're not yours either. However, only you can take the initiative to make the situation better.

2. Think through the activities you do where you actually do have quite a bit of clarity and focus. I'm guessing there's something you do that just makes time seem to melt away. See if there's a way to harness what interests you in that activity, and see if you can apply it in a constructive way. I have two: playing RTS games and driving or doing some other fairly monotonous activity that nonetheless requires attention and focus. Playing RTS games has actually helped me develop strategies to remember to do things, and driving long distances suggested to me that if I constrain my environment in certain ways, I can actually be quite productive and attentive.

3. Use some strategies/invent your own.

- I find that writing down checklists is a huge help. It makes the big problems crumble into small manageable bricks. (For checklists, I've started literally putting notes in VS Code in a markdown file, and then using the Markdown Preview Enhanced extension, which shows an interactive, two-way bound rendering on the right pane of my screen.)

- Bootstrap the right mindset every day. I put a few post-it notes around my monitor, bathroom mirror or other places that I'll see to remind me how to deal with life. I put enough up that they'll help me without making me feel overwhelmed. This strategy is also useful for any self-control issues you may have, which usually goes hand-in-hand with a lack of motivation/feeling overwhelmed by big problems. When I make a good decision based on a reminder from the past, it's a fun feeling. These good feelings can form a sort of virtuous cycle where you find yourself being a bit more disciplined than you have been.

- Quit social media. I've entirely cut out Twitter and I only use Facebook Messenger. I don't miss any of it. I visit HN more now, and use the "attentiveness" features in my profile. This may seem drastic, but it's helpful.

- If you can't quit something (YouTube, for instance), use some sort of blocker that will keep you locked out for a time. I edit my /etc/hosts file, although there are more automated tools that can do this kind of thing.

- Read up on tactics people use for things like speed reading or note-taking or other organizational and personal management skills. Then put them into practice. I've started using a RocketBook for note-taking, and it's wonderful. I use a specific note-taking method called the Cornell Method [1], and I find my focus and comprehension when learning big new topics is much higher. Find what works for you, and implement it.

- Trap yourself into pro-productivity habits, not anti-productivity ones. Eliminate any distractions or interactions when you're doing productive work; maximize the number of distractions when you're doing unproductive things (like getting so far into YouTube's recommendation algorithm that you watch a Japanese guy make hard objects out of bread or fingernails - this may or may not have happened to me). I set timers for that stuff and otherwise try to harass myself as much as possible. When I'm working, I set Do Not Disturb mode on anything supporting it, I turn off other notifications (within reason - I'd recommend you still respond to your boss/client, for instance). Look into things like the pomodoro method, where you work for 25 mins and take a 5 minute break, and see if you can increase the productive time.

4. Find something you think you can't do, and then try to do it and don't give up. Steve Jobs once said, "Everything around you that you call life was made up by people that were no smarter than you and you can change it, you can influence it, you can build your own things that other people can use." [2] My experience has shown this is quite true. We make our own luck. I've learned that with enough effort, that feeling feeling in the pit of my stomach that coincides with the thought "I don't know how I can tackle this problem" has almost always given way to the feeling of victory when I actually do solve the problem. I haven't had 100% success, of course, but I always frame the lack of success as TODOs to revisit later. I have my current job because I did this, and it's the best job I've ever had with the best team I have ever worked with. Once you do a single thing you thought you couldn't do, your perspective on life does change somewhat.

5. Make change gradually. I didn't take a magic pill and have all problems in my life solved. In fact, I can't do this - I'll be dooming myself to failure. If I try a new exercise regimen or trying to form habits or something like that, I do them one at a time. I find it hard to cope otherwise. My wife is the opposite - she gets motivation from shocking herself into a new routine, but I just can't handle that approach. I set major goals on the order of years, milestones on the order of months, and then individual strategies and tactics on weeks or days.

6. Find the positives of your situation. Unlike most people who have a basic intuition about how to accomplish complex tasks, I have devote my own brainpower to it. However, this has resulted in me developing an almost scientific process for improvement, which most normally motivated/attentive people don't have. There were people I graduated college with who had no issues with ADHD and were far ahead of me in terms of organizational skills and the ability to self-manage. However, through continual work over the years I've surpassed many of them in accomplishments. Career accomplishments are not a measure of a fulfilled life, of course, but making genuine contributions to fellow humans (even if those are fairly small but real) is a good feeling that is hard to overstate.

7. Try to control your emotions without suppressing them or letting them run wild. I find that a lot of the source of my "mental laziness" actually doesn't involve the mind at all, but my emotions. I have to engage the mind to counteract the emotions I experience, and when I do, the strong emotions holding me back (e.g. fear, anger, boredom, despair) are actually not that severe. Putting emotional experiences into words is a simple strategy that can be helpful. Our brains have a sophisticated neocortex which can handle complex reasoning, including linguistic reasoning. Our emotions are thought to be processed and generated by our limbic systems, which are present in most vertebrates and is pre-linguistic (though is very much involved in vocalization of emotional tone, even in non-humans). I've found that the higher functions of our brains can actually put the lower functions in their place when warranted.

8. Use therapy and other resources to help you. Therapists can absolutely help. You will find there are probably treatments that you can do that will help, and many of them do not involve medication. A therapist can be especially helpful at determining the causes of why you feel the way you feel, and may be helpful in developing strategies to overcome these issues. A therapist can also be a shortcut to some of the experimentation I mentioned above. They are often aware of explicit strategies that work for many people, and those might directly help you or might be a good seed that grows into something unique for you. And it's sometimes helpful to be forced to put your thoughts and attitude into words for another human being, who can synthesize it and review it with you.

This list has ballooned from a few planned points, but I hope it helps. You can vanquish this problem. I think you would be surprised at how much you can accomplish by putting forth just a little bit of intentional effort in the right ways.

[1] http://lsc.cornell.edu/study-skills/cornell-note-taking-syst...
[2] https://www.youtube.com/watch?v=kYfNvmF0Bqw&t=38s