You actually did well, or were very lucky to not have rear ended him. Target fixation.
Great advice has already been posted and it sure seems you are willing to take it in. Your mistake is very common, and that and other small brain farts happen to all of us, they just usually don't result in...