Please do not become one of those who resort to abuse, or even death threats, to overcome their disappointment. Shrug your shoulders. Learn from it. Remember, every one of the famous literary names alive has been told at one time or the other by a publishing house that they might as well give up the writing game and go earn a living waiting tables. This is almost entirely due to the fact that editors are increasingly unable to deal with the thousands of manuscripts that are sent to them each year.
Literary agents act as a buffer for the publishing industry.
If something is submitted via an agent then the editor can be reasonably sure that both it and the author been vetted and are not completely unworkable. Publishers trust agents in a manner they will never trust the general public. My advice on approaching an agent runs along much the same lines as approaching a publisher. In Australia you can write to the Australian Society of Authors who should be able to give you some idea of what agents there are, who has their books closed, and who takes what for a minimal price. If the agent wants to read your work then they'll discuss prices etc.