I was diagnosed with pernicious anemia about 15 years ago. That's the autoimmune disorder where the body produces antibodies to intrinsic factor, which is necessary for absorption of the B12 from food. So I've been dealing with this for a while.
Experiencing the deficiency can really, really suck. I feel your pain. Did your doctor do any other investigations to determine why you had the deficiencies? Just diet, or...malabsorption due to...?
The good news is, it really is simple to bring your B12 levels back up to normal fairly quickly. Injections of cyanocobalamin seem to work well, no matter the cause of your deficiency. After that, an oral supplement is sufficient for most. (I'm currently experimenting, under medical supervision, with taking oral mega-doses to see if I can get enough B12 absorbed along the entire GI system. I get my oral B12 from the pharmacy, and it's just B12 mixed with starch to make a tablet. As far as I know, the B12 is from bacterial sources. Both cyanocobalamin and methylcobalamin forms have worked for me.)
Re. B12 from fermented foods - like some of the other commentors, I have heard conflicting things. It can't hurt to increase your intake of fermented foods, but I wouldn't rely on it until you have built up your body stores of B12 again. That's a general principle I would recommend as someone who's experienced the effects of low B12 - treat this seriously, take a supplement, eat some natural forms of B12 in meat or clams, and then...think about your food system once your energy and mental state are rebounded. I agree that it's hard to raise a complete diet yourself - there must be some foraging and trading in the community.
Best of luck.