Going to the hospital just to get free insulin at the ER definitely should be your last resort, as you may have to wait hours, and end up with a huge bill (even though you won't have to pay it right then).
Of course, if you don't have another alternative, or if you are having an emergency -- like possible ketoacidosis -- then don't hesitate. Otherwise, the other options are much better.
If you do run out of options, at the ER you will be able to see a doctor (or nurse practitioner or physician's assistant), who should provide you with some insulin and maybe a prescription for more. Plus, they will not require payment at the time if you are unable to pay.
However, they will bill you (and a lot!), unless you request, and are approved, for free or reduced-cost care. And even if you have a moderate income, it's best to apply for this. They'll ask you several questions and/or have you fill out an application.