You recognize that is destructive behavior that does not help further your career, right?
Okay, so take the "jealousy/not getting the part" aspect out of the situation, and try to look at it objectively:
What advice would you give a dancer that cannot bring themselves to exercise and train constantly in between gigs, and then gets injured every time they perform? What about a doctor who can t stand the sight of blood?
Rejection and role-comparing is apart of the industry you have chosen. If you can t handle that aspect of it healthily and productively, you either quit or you modify your profession or you change your self.
Quitting is easy. It might be the right thing to do, or it might just be giving up on something that is an intrinsic part of you - you have to decide that.
Modify your profession: The dancer might be happier doing performance art; the Doctor might want to become an psychologist... there are ways to practice your art that don t involve auditions and working with others.
Change yourself - which is the hardest, and the most likely to lead to a satisfying life. Therapy might help you to see this not as a competition between actors - however much it feels like it - but a collaborative art form, struggling to create beauty and meaning and human connections in a world that sorely needs what we do. When any actor performs well, they are elevating the art form you have chosen, and are helping you personally in your career - even if they got the role you wanted.