Although I know that some of these points have already been stated, I think a full reiteration will do best in this circumstance.
Before I begin, however, I will say that I have been where you are before; when my ex-boyfriend and I broke up about 5 years ago, he became obsessed with me. He began following me to school, work, and to my friend's houses. He would sit outside of my window at night while I slept. Unfortunately, I did not find out about the majority of this until the day he pulled a handgun on me and tried to end my life. After he was unsuccessful, he ended his. In this case, I can say I am quite fortunate; I have finality and closure.
The following pieces of advice ended up being very useful to me, and I have added a few of my own:
1. Try not to be alone in vulnerable situations. If you are at work (you mentioned a night shift), see if a coworker can walk with you to your car. This will give you a witness in case anything happens.
2. If the harassment keeps up, installing a dashboard camera/video camera is a good idea. You would then have pictures of him in the act, which would give you proof.
3. Always let someone know where you are going. I have found that it's best to be cautious when dealing with irrational people, especially those who are posing as rational.