Failure is a way to understand how to succeed. Thomas Edison, discoverer of the light bulb, when asked how he felt about failing to discover it 900 times during trials said, “I have not failed, I have discovered 900 ways that don’t work.”

What’s unfortunate is that many people are taught wrong by their parents. Too many times parents say, “Oh wow you’re so smart!” when someone scores well on a test, not knowing that being “smart” implies an implicit gift, an inherited, un-malleable trait. The problem comes when that same child doesn’t test well, the self-talk becomes, “I didn’t test well because I’m not smart.” This can cause a ton of self-esteem issues, emotional issues, and feelings of defeat. Instead, parents should be saying to their children “You did well because you worked so hard!” because when a child didn’t get an A, he now understands that he just needs to work a little harder, something that he can change.

How one deals with failure is different. For example, studies imply there are gender differences in how women and men deal with failure. Women tend to talk about it more, ruminating over the issue with friends. However such rumination has mixed results. Those who ruminate over the negative more have a stronger correlation with being depressed. Men seem to take action more, which makes for lower rates of (reported) depression.

A healthy mix of both is important – one should talk about it, feel the emotions instead of pushing them away, get support, explore personal triggers, get away from toxic people, then pick yourself back up and do better next time around.

Note that this formula has a caveat – it’s extremely hard to pick yourself up and keep going in a toxic atmosphere. For example, some managers will work you to death, not care and hire someone else after you’re done, that’s a healthy you in a toxic atmosphere, the key here ISN’T to pick yourself up after being burnt out and try again, the key is learning how to walk away. The same is true of toxic relationships.

Most importantly you need to learn valuable lessons from your failures. If you failed in a test you can figure out what happened, which types of problems made you do badly, how can you improve. If you failed In a relationship, you can read self-help books and be a better person, go see a therapist or a life coach. If you failed out of school, maybe school isn’t for you, and you need to do something else. There are over 17 billionaires who didn’t graduate college. Don’t let the myth of college determine your success.