In other words, deciding to quit your old job was probably a good idea. If going freelance isn't a good idea for you it doesn't invalidate the idea of quitting your job. It just means you have to come up with a new idea.
I feel for you though man, freelancing was tough. Especially if you made as many mistakes in it as I did. From what you say however, I wouldn't have stayed very long at your old company.