As someone who got hit with several of those: the best advice is "Find good ways to deal with your frustration and start adjusting your expectations downward. Start by getting a therapist."

Unfortunately, there doesn't seem to be a reliable way to recover your losses besides "get lucky in the future". Your career advice is the same as everyone else's, just with worse expected outcomes.