There seems to be two ways to harness your muse to work when you want to. One is to write at the same time every day and most writers seem to swear by this. The other is to spend a few months sitting down to write for a half an hour at any and every time of the day until you train yourself to write any time you want. This takes a lot more front-loaded effort.
Like many people, a writer may have folks enter their orbit because of their work that you are interested in romantically/sexually/whateverly. Be careful! Of course, a power differential is unethical to exploit, but this is for YOUR protection as well. Even when you are sure someone is not starstruck and their consent is totally informed, they may be projecting who they think you are onto you or idealizing you or not really seeing you as fully human.
Sometimes you have to put that thing you're sure is brilliant in a drawer and walk away. Take the lessons you've learned along the way, enjoy the experience, and start on something else. Maybe you come back some day, or maybe you realize that's not the best idea. It may be the first real darling you have to kill.
Your best time management skill is self-knowledge. Do you write better on deadline? Without? A soft deadline? Are you a fast writer or is your progress plodding? Arrange your deadlines accordingly.
"Writing is like exercise" is an imperfect metaphor, but it at least conveys that the way to improve is to establish discipline and routine.
I can't speak for everyone, but for me, imagining my negative inner voices as actual people strips them of their power. Imagining my inner critic as one of my past abusers is particularly effective. "Fuck you, I'm going to nail this shit."
When it comes to writing, you are what you read. Read nothing but Twitter and you will probably start thinking in 280 character chunks. Read nothing but political rants, and you will probably start thinking in partisan polemics. Read nothing but FB, and you will try to be cute and pointed, but probably not nuanced or informed. Broaden your diet. Digest some good stuff.
Don't sit down to write a book or a chapter or even the best paragraph ever. Just focus on one word at a time.
It's very hard to write when life isn't going well. (And sometimes it's just impossible.) But if you can gut out a FEW words under adversity, you'll be that much better when things are bending your way.
I simply can't get enough of these Fortune Cookies!