A long bout of anxiety is enough to cause this to happen to your hair.
It may seem to you as if the timing doesn't tie up because it didn't happen exactly in tandem with your illness, but the hair can react this way long after an illness, as the nutrients that were needed to feed new growth don't get supplied, and the shock the body suffered from the illness takes effect.
Hair, although it seems vital to us from the outside, isn't at all necessary for survival. So when the body is 'under fire' these non-essentials tend to get jettisoned!
Having your hair cut into a shorter style may help a lot in terms of reducing the volume of hair that you notice coming out, but you also need a good programme to build up your resources again.
I suggest taking Hair and Nail Complex, together with Feroglobin iron tonic (the one with B12 in it), whilst ensuring that you are drinking plenty of water every day.
Avoid tea and coffee as much as possible (they block iron absorption), and eating a good selection of vegetables every day, with some high quality and easily absorbed protein such as fish, nuts, seeds, and tasty things like humus (if you like it).
It will take about 3 months to start rebuilding your hair reserves, so don't panic if you don't see a difference quickly. Remember that anxiety is part of the problem, so anything that helps you relax and feel good in yourself will help.