OK, this might sound a bit woo but your desire to just stop cycling altogether might be a result of not having had time for your body to process the shock properly yet. (I work as a therapist and physical responses to trauma is an area of interest for me).
In frightening/dangerous situations a huge amount happens in your body as your nervous system kicks into fight/flight mode. Wild animals that have escaped a predator/experienced something frightening or dangerous commonly go through a period of shaking and trembling - the contemporary theory is that this is a normal process that means the sympathetic nervous system is discharging its fight-or-flight energy.
Animals do this naturally, but humans often try and repress the shaking after an accident or similar, as it seems weird or frightening. If for whatever reason the shaking phase of your body's recovery from this shock was interrupted that sets up a system where you try and stop it from happening by avoiding any situation where the shock might happen again, which in turn can set up patterns of avoidant/phobic behaviour that may become very difficult to break in the long term.
So while it might sound weird, in the first instance you might find it helpful to spend a bit of time letting your body process what happened. If you sit somewhere quiet and safe, then remember back to the moments when the car overtook you, and just try to remember what your body felt like. You might find yourself shaking, or notice that your body wants to make small movements. If you get that feeling, just let the movements happen. They'll most likely be self-protective movements your body wanted to make as it realised you were in danger. Allow all of this to happen, slowly, while just noticing the sensations in your body. Don't get caught up in the emotion, just pay attention to what's happening in your body. After a while, any shaking or movement will come to an end. You might feel physically a little different afterwards.
The theory behind all this is that avoidant reactions after a shock are often the result of active physical defences (eg running away, putting your arm up) that didn't have a chance to complete themselves at the time. If you are able, after the event, to think back over what happened, remember the sensations, and allow those physical actions to happen slowly, without going back into the fear, then it often helps to resolve the shock and allow your body to reset itself.
Sorry, that was a monster post. Really just a long way of saying YABU from a rational point of view (statistically the probability of an accident next time you cycle is small) but YANBU at all from an emotional/physical point of view and your feelings are quite normal. You can choose to just avoid cycling, but you could also maybe try to give some space to processing the physical experience. If you can complete the active defensive processes that happened at the time, you might find the experience starts to feel less overwhelming.