Humans can only take so much; we were designed that way. We need a good night's sleep after a long day, a hot shower to refresh, and plenty of water to keep us cleansed. These are tangible items, obvious to anyone who is living their day to day life. But humans can only hold so much in their mental capacity as well. Sometimes we just need to know when to walk away.
This issue may be different for everyone, as it can span many areas in an individual's life. Let me give you a few examples. If a job is giving you very little pay, making you miserable, and changing who you are as a person then it's time to find a new job. If your current eating patterns are causing you to be tired all the time, gain weight, and feel bad about yourself then it's time to pay more attention to what you're eating.
A common instance of knowing when you've had enough usually involves relationships. Whether they be romantic or friendly the signs aren't difficult to recognize. If the other person has no regard for your feelings or their relationship with you, let them go. If the other person fails to see the error in their ways, let them go. If the other person always believes they are right then there is no use arguing with them, let them go.
You can try to fix these problems with everything you have, but odds are it's too far gone. You'll come up short, exhausted, and feel the same as you did before. If the situation does turn itself around then that's great, but don't feel you failed if it remains. Walking away from a situation that has hurt you is the greatest thing you can do for your well-being. In fact, it's a vital task if you want to prosper as a person. Know your limits and stick to them -- always.
Steer away from negative things and negative people and you will attract more positivity than even you knew you could find. Most importantly, never feel the need to justify your feelings to anyone who doesn't understand or makes you think you're wrong for feeling such a way. Odds are your feelings matter and that person doesn't matter much in the next chapter of your life. Cheers to finding peace! You deserve it all the time, don't let anyone tell you differently.