I struggled with this as a new lecturer, and I found a few ways to manage the process of using a big blackboard:
Observe people lecturing
When I first started lecturing, I visited the lectures of other staff to see how they did it. I realised that when I was a student I had seen many lectures, but I had never thought about the actions of the lecturers at the time. So I went to lectures to see what the lecturer did: I noted whether they had notes they referred to, and I noted how often they referred to them; I watched how often they turned to face the class to talk rather than write; I watched how often they stood back to observe their own work; and I tried to take note of anything else they did to do the job of lecturing.
Write your notes in advance
If at all possible, write your notes in advance. Then, if you get lost, you can look at your notes to see where you are up to. I found it helpful to lay the notes on the bench and turn the pages over as I moved through the lecture.
Note that if your students are copying what you write, they themselves will flick back through what they have written to check where you are up to, so there is nothing wrong with you doing the same!
Regularly stand back to see where you are up to
My PhD supervisor gave me a piece of advice which is very logical: when you are 50cm away from the board you can't see what's going on, so stand back every so often to look at the whole thing at once. You should do this before you rub out the board, and also any time you finish a particular paragraph or calculation. Also its especially important to do it whenever you feel you are getting lost.
It's not just useful for you to keep your perspective, it's also useful for your students. They will appreciate the extra few seconds to write down what you've written and to assimilate the information. I know I did when I was a student.
Signpost your writing
When you write on the board, you should use headings and underlining and other markers to tell you where thoughts begin and end and to tell the students (and yourself) where you've been and where you're going. These should be consistent across the time you are speaking.
So if you have a theorem, write "THEOREM" on the board and underline it. If you feel brave you can always use a special symbol like a triangle or picture next to it to visually indicate what's there. When you do an example, say "EXAMPLE 1" and underline it. It is amazing how helpful this is as a student to know that you are beginning or ending a new thought.
Stop to check where you have been
As you lecture a very helpful thing for the students is to stop to see where you have been. Not just in your own head but aloud. So in combination to stopping and looking at what you have written on the board, stop and talk through what you have done so far, including the things you have rubbed off.
For example: "We began by defining what a metric space is, which was a way of defining distance in a reasonable way. Then we looked at a few examples of metric spaces and metrics to get a feel for how this works. Then we talked about what it means for a set to be open, and we proved that an open ball is itself open. Now we're up to proving that the union of any collection of open balls is open." As you do this, you can flick through your pre-written notes. This is very helpful to your students, but will help you to keep focus as well.
If you don't have pre-written notes and are making the lecture up as you go (as sometimes happens), then this is even more important. I did a revision lecture for students last week where I made it up as I went (on metric spaces as it happens) and I stopped every time I got to the end of a thought to check where we had been. It felt much better to know in my own head where I was up to.
I'd also recommend making space on the board to write where you've been -- just the major headings along the side somewhere. Then when you look back at where you've been you have something to refer to and you can add to it as you go.
Don't use the blackboard
And finally, I have to say I don't use the blackboard/whiteboard anymore. The lecture theatres in my uni all have document cameras so I use paper and pencil on the document camera. At a pinch I have used my tablet PC and written on a PDF on the screen.
The advantage of this is that when you do go back to see where you've been you can flick through the actual notes you actually wrote (or scroll if you're on a computer). Not to mention being able to use colour more effectively!
All the other comments about stopping to see where you've been, and recapping the story so far and using signposts still apply to make it more effective, of course. And if you have no choice but to use a blackboard/whiteboard then they are the most helpful things I can suggest.