I agree, you must follow up with your regular doctor. If you don't have one, you need one now.
With asthma there are several medications now that can help, but you must work with a doctor to get the dosages correct. A simple rescue inhaler won't do much, that's only treating the problem after it happens - not preventing it and the damage it causes.
If you smoke, have smoked for years, or are regularly around smokers that may change your diagnoses some too.
I'll give you the benefit of the doubt about using the ER - were you truly having an asthma attack it would have had to be a bit frightening. It's not just a simple cough. A person coughs and gasps and cannot get their breath at all. Asthma attack related ER visits are common and are an emergency.
A little tip - coffee. DH says it helps him some when he has an attack.
I hope you can get this under control and treated.