Depending on the weather, the days events, and other factors, I find myself with a different emotion everyday when I write which I'm afraid is making my novel a little bit choppy. For example, one chapter might be portrayed in a light mood, while the very next, for no literary reason, is written much darker because I received a bad phone call while I was writing. What I've tried to do is to abstain from writing until I'm in the appropriate mood with which I had started off the piece, but this is stopping me from writing on it a regular basis and slowing down the whole process significantly. I'm afraid that keeping the same personality is becoming more difficult as I stretch the length of time which which I'm writing it as I'm becoming a different person. So how do experienced writers help get into a specific "writing mood" for the piece they are working on?
I read somewhere, don't ask where because I forgot, that if you wait for the right mood to write, you won't get anything done.
So, I think if you just try to sit in front of your computer/paper, relax for a few minutes and delve into your character's mind, it would be better than to just not write until your mood gets better. It's hard, I know because I struggle with it too, but maybe in time it gets easier. Try to write at least a 100 words. It'd be better than nothing. Also, music might help. Putting a song in the background, very low if you don't like to hear music while you write, that goes with the tone of the scene, could help you keep the scene consistent.
One solution that usually works is to write when you wake up, when nothing has happened in the day. I write for two hours every morning. My alarm is set for 4:30 AM, I am at the keyboard by 5:00 AM, and I write until 7:00 AM. Nobody calls, the only interruptions are the dog asking to go outside and refilling my coffee cup.
This might fail if a multi-day disaster befell me, like a death in the family, or a car accident. But typically, at least for me, irritations and foul moods dissipate over a night of sleep and don't bother me in the morning.
If you don't have time every morning, you can solve it by doing the same on one of your days off, perhaps like a Sunday after a Saturday so your mood is more predictably stable.
If you aren't a morning person, try writing after an afternoon nap.
Finally, you can do the same thing after you finish the novel and go through an edit for a second draft. Find a way to write with a stable attitude, and even out the tone then to make it consistent.
Keep in mind that you may need to go through many revisions regardless after you have a complete draft. So, some kerfuffles at this point may be OK, unavoidable, and/or lead to interesting plot points later. Also, keep in mind that most readers do not want an absolutely monotone story, and that your characters are probably supposed to have emotions, too.
If this were me, I'd probably do one of two things.
Work on a chapter that is meant to be darker, when I feel dark. Or,
Write other stuff when I am not in the right mood. I like writing background for my characters as side exercises - How people met, what their worst fight ever was, etc. Usually, creating those experiences in a concrete way ultimately influences my story directly - I have a solid, consistent event I can draw from to make chance comments or even a minor thread through the narrative.
I find writing to be therapeutic. This is not uncommon. It may be that the act of writing will get you there. In a sense, this is like the comment under your question that compares the practice to going to the gym - even on the days you don't want to go, if you go by the end of the workout you'll be in that familiar post-workout place, and feeling pretty good.
Something I saw somewhere on this site as an answer that I think really has helped me, and might help you is to write based on your mood! YEP, if you are mad, skip a few chapters to write the angry scene you have later planned, if you are sad, write the depressing scene you have planned, and so on! I have found that after doign this, the parts that are intended to be emotionally charged feel that much more real and authentic because you were feeling that emotion when writing it. Nothing says you have to write your book completely front to back, just make sure you tie the pieces in when you are able to :)
Simply write. Only you can say when works best for you, but write daily even if only for fifteen minutes. Remember this is writing. You can always come back later and rewrite, add, remove. Nice thing is it is not permanent. Just finish the first draft and then you can come back with a clearer eye and edit. Never delete anything. Set up a secondary doc with your removals in case on their third rewrite you decide to put it back.
As a person who struggles with depression, I have the same problem you do. My mood greatly impacts my ability to write, and what comes out when I do.
I can say emphatically when I feel darkest, nothing helps. I just have to be okay with not writing that day, or until my mood or emotional state changes. But there are other times when I can still act like a professional writer (I'm not), "cowboy up," and do the job (it's not my job) of writing.
To get to that point. one thing that helps me is to read over what I wrote the previous day. Or, go back to the beginning of the chapter or scene or whatever logical unit in the book you have to retreat to. Go backward in the manuscript. Read forward, putting the story back into your head.
Let your imagination crawl back into the world you've created, the characters, and let THEIR moods and action dictate the story. It may not always work, but for me, it helps a lot to get out of my own headspace and into the characters' headspace(s). Being there, watching it in my mind's eye as a movie, I can transcribe without allowing my mood, my emotion of the moment, impact what I'm writing.
And +1 to those answers about using mood-adjusting tools like music, or writing a scene from the manuscript suitable to your mood, if you can't step around it.
Consider lighting in your writing space, too. Or you can, as A N M provided, journaling to clear your head of the things affecting you might be of great benefit. Get the things holding you back out of your mind, onto paper, and be rid of them.
I hope this offers a bit of help. I know it's a tough row to hoe, but I have learned emotions make great servants, but lousy masters.
Listening to music can be good, as others have mentioned. Another technique you might find useful is to meditate for ten to fifteen minutes. Headspace has some good resources for this, they have an app which I use occasionally.
Aside from that, if it's a first draft, I wouldn't worry too much. If you're getting the story down that's all you really need. Tone problems can be sorted out in editing.
The first and foremost requirement for a writing mindset is the desire to tell a story, or prove your point. Without that, writing becomes sheer torture. Before writing, think on why you want to write, whom are you targeting and how will it impact readers.
The next thing to do is to start writing ....
As mentioned in some answers above, the only way to get into a writing mindset is to start writing and keep at it ... no matter what.
Writing is like exercising, programming, art ... whatever. Even if you do possess talent and imagination, you will not do good by not writing. You need to just write, write and write.
When you're writing ... it's only you and your notepad / laptop and your imagination at work. Take some time off the day, not necessarily early morning, but could be late at night or anytime when you're sure you won't be distubed. It would help if you did not have any distractions next to you (as you mentioned .... one bad phone call can alter your mood).
But don't overdo it and stretch yourself. Too much thinking might alter your writing as well and might hamper creativity. Like all things, start small and keep going as you grow in confidence.
Writing is a stupid waste of time. It will make you lonely, but it won't make you rich. I can think of only two legitimate reasons to write:
A profound and unshakable regret for not having written.
A publishing contract with a deadline attached.
It follows that the only reasons to write are to shake off the melancholy of not having written or to meet your contractual obligations. Neither of these are a mindset that you should need to get yourself into. The issues is not getting yourself into the mindset. The issue is that writing is hard work, mentally and emotionally exhausting. Actually getting to it requires the same discipline as starting on any other exhausting task. Get on with it because if you don't you are going to be poor and/or miserable.
And if that is not the case, don't bother, because writing is a stupid waste of time.
I find that in order to write best, uninterrupted, is to start really early in the morning. Train yourself to get up when no-one else is up, making sure that you are not too cold, get a drink. Sit, and write. Keep on writing until you hear others waking. Stop. Works every time. Interruptions are the devil's idea of fun. Write from the heart. Music for me is a waste of time. Just another interruption. I have written 49 pages before my son even gets out of bed. Job done.
"Waiting for the mood to strike you" is bad practice. Your writing muscle, like any other, needs to be exercised every day, if you can, or at least as often as you have time. (Some of us have jobs and whatnot, writing every day might not be possible.)
If you have the time to write, there are several tricks that can help you find the right mood.
First, sometimes the troubles of the day can be weighing on you. You need to clear your mind, find that space for creativity. @Lauraducky suggests music and meditation. I have found both useful. Keep it brief. Find what helps you focus, and do that. With time, focusing will become easier. It's a form of mental exercise - everything that isn't your writing - you're not thinking of it right now.
Then, read the last few paragraphs you've written. There's a flow to a story. Reading the last passage should help you get back into the flow.
If there's a particular mood you're trying to evoke, a chord you can't quite seem to strike, it can be very helpful to find a piece of literature, film, or music that evokes that emotion. Read/watch/listen to it once or twice to immerse yourself in what you're looking for. Don't let yourself read/watch on to other bits, get carried away - that's procrastinating. Keep the break brief.
Finally, if nothing works, write anyway. Write something, even if it isn't coming out the way you'd like it to. When you come back to editing it, it will be easier to change things, draw the text closer to what you want it to be. It's easier to find what needs to be improved, and how to improve it, then working from a blank page.