How you face rejection is just as important, maybe even more then, as how you celebrate success. Just because one work is rejected, doesn't mean you give up and throw the project away. Set it aside for a while until you can face it with a new perspective and work on something else in the meanwhile. Just because it's rejected, doesn't mean it's no good. It just means it needs more time and work to get it ready to be published. Many great authors had their work rejected a lot of times but they kept at it and are well loved and well celebrated to this day.
Another point about rejection, if an agent or editor of publisher rejects your work, it's not very wise to write back to that person and insult them by calling them stupid or saying they don't know what they're doing. And it certainly doesn't make your case stronger by bragging the you're a med student or phd candidate with such a high iQ that means your work is automatically brilliant and deserves to be published. It's not professional, not mature, and not at all helpful to your writing career.
All this serves to do is alienate you from a potential help in the publishing industry and is bound to make sure that agent or editor of publisher never looks at your work or any other project you write again. And what's worse, you don't know who that person knows in the industry. Perhaps they know someone else in the industry who could have helped you to get your work published and might have passed your work onto them for you even though it wasn't right for himself/herself.