This is the only valid answer. But to make it stronger still i would say; Lower your expectations overall and Change your expectations of the existing conditions.

What you are going through is the same as what a lot of others too have gone through. It is nothing new but since everybody's circumstances are different, you have to find your own unique solution.

Here is my suggested strategy;

* Don't quit your job but take some time off to work through your issues and clear your head. Make it a week at the minimum even if you lose some pay.

* Sit down, calm your mind and write out the following;

- What are your job's responsibilities i.e the absolute baseline requirements to maintain it? Throw out everything else; it doesn't matter what they could get you (money, promotion etc.) in the future. The idea is to stabilize the present and get into a good mental state. You have to limit everything that you get involved in, in order to gain control over the situation.

- Are you having problems with colleagues, management etc.? Write out in detail what and with whom. For each, see what you can change at your end and act on that. If you cannot change something limit your exposure to that stimuli. For example; is some colleague making you feel like you are not good enough? Limit your interactions with him and ignore him completely i.e. eliminate him from your mind. Do not allow negative stimuli to permanently affect your mind.

* Work on projecting confidence and strength when interacting with others even if you don't feel like it. We are Animals at the fundamental level and can pick up on the slightest of weaknesses in the other. The problem is that we act on this unconsciously to our perceived advantage even if we don't mean to. For example, somebody else mentioned about self-esteem issues based on a single line in your profile. If you don't value and respect yourself, why should others?. You have to demand respect, status etc. i.e. you must stamp your individuality in all interactions. Straighten your posture, look people in the eye and speak confidently.

* There will always be people better than you. So if you evaluate your worth based on comparisons with them only, you will always look the loser. Stop comparing yourself to others and only compare to your previous and earlier self. For example, Have you evolved for the better from "yesterday's you" w.r.t. knowledge of something? That is enough.

* Finally, read The Enchiridion (aka The Handbook) of Epictetus and try to apply it to your life as much as possible - https://en.wikipedia.org/wiki/Enchiridion_of_Epictetus Here is the first para broken down;

- Of things, some are in our power, and others are not.

- In our power are opinion, desire (movement towards a thing), aversion (turning from a thing); and in a word, whatever are our own acts:

- Not in our power are the body, property, reputation, offices (magisterial power), and in a word, whatever are not our own acts.

- And the things in our power are by nature free, not subject to restraint nor hindrance: but the things not in our power are weak, slavish, subject to restraint, in the power of others.

- Remember then that if you think the things which are by nature slavish to be free, and the things which are in the power of others to be your own, you will be hindered, you will lament, you will be disturbed, you will blame both gods and men:

- But if you think that only which is your own to be your own, and if you think that what is another’s, as it really is, belongs to another, no man will ever compel you, no man will hinder you, you will never blame any man, you will accuse no man, you will do nothing involuntarily (against your will), no man will harm you, you will have no enemy, for you will not suffer any harm.