I think it's always a shock when something like this happens. But blaming yourself is pointless - they have no idea what causes an individual to develop peanut allergy rather than, say, cows milk allergy or no allergy at all. It's complex.
Did your doctor make up a treatment plan with you (in case of future reactions), or just hand you an epipen?
If you haven't already got some, buy some Piriton liquid. This is an antihistimine and is the first line of defense in case of a reaction, epipen is the second (but it depends on the severity of the reaction). From now on both need to go everywhere with your ds, along with his treatment plan and everyone who looks after him needs to know about the allergy, what to avoid, and what to do. Kick your DH up the arse cause he really needsto be on board with all this. It's important.
If you haven't already had this happen, go back to your GP and ask for a referral to a pediatric allergy clinic. They can answer your questions, and monitor the severity of the allergy through skin prick tests/blood tests (just a drop of blood so don't worry).
Anaphalaxis UK is a good source of info and support.
My ds1 was diagnosed w peanut allergy (amongst others) at 10 months. He outgrew it by age 6 - this can happen. I found the early days very hard and stressful but you do get used to it. When he was 3 or 4 and could help keep himself safe it got a lot easier.
They are developing treatment for peanut allergy right now and the trials are looking very promising, so I'd say its unlikely this is a condition your ds will have for life.
I found this board a real lifeline in the early years. I hope you find it the same.