It sounds like you had an abcess. Your doctor was right in fussing you, becasue the poison can spread to other parts of your body and could have caused septecemia (blood poisoning).
Instead of using bought deodorants that seem to irritate and cause a bacterial infection, why not try dabbing on some Bicarbonate of Soda?
You can buy this cheaply from supermarkets and pharmacists. Do not confuse it with baking powder. It is Bicarbonate of Soda, sometimes goes under the name of Sodium Bicarbonate.
As an underarm deodorant, just dust the armpits with the bicarbonate of soda after washing or showering. This may also help you not get any more abcesses.
Bicarb of soda has lots of uses. You can place some in a container in the fridge to get rid of odors, put some in your shoes to get rid of nasty smells. These are just a few uses, you can also use it in baking, cleaning and all sorts.
If you get any more of those nasty lumps, go to the doc asap for an investigation and an antibiotic if required. Magnesium sulphate can be used as a drawing ointment, but only when the skin is not broken.
Dr. Oz had an audience guest who had a huge cyst under her arm. He insisted she go have it lanced, etc.but he questioned her method of shaving. He said using someone else's razor can spread the infection, etc. He suggested she stop shaving under her arm or use a disposable and to cleanse under her arm very well prior to shaving.
I don't know why women want to shave under the armpits if they don't wear sleevless garments.
After all, hair on our bodies is natural. I have hairy legs (my husband's legs have none). As you get older the hair growth gets less. He asked me once, had I shave under the armpits as I did not have much hair there.
But I agree with diane493 never use other people's razors, brushes, combs, toothbrushes.
The boil is usually lanced when it is so inflamed and pussed up with no head on and the pus needs to be drained out so that it does not spread further inside the body otherwise septecemia could occur.