How do I gain self confidence and stop feeling sad?
Confidence?
Sadness is a part of life. Something about sadness that is difficult to accept is that it is inevitable, and we shouldn't judge the times we are sad as times when we are somehow "less than others." That said, it seems your sadness comes from a place lacking compared to others. You find yourself losing in the battle of life because other people live life better than you do. Maybe they make more money or have nicer things, better bodies, and more control over things. These are the arbitrary measurements you have perceived in others that you are losing to.
I will validate the difficulty in not comparing yourself to others. Many things in therapy are so easy to say but so difficult to do. Often therapy can be spent on figuring out what makes things so complicated, whereas others do those things without effort or consequence. Our mind plays tricks on us to make us get better than we are, and the comparison game is derived from a childhood of not meeting expectations and, therefore, not being enough. Thus our mind adopted beating ourselves up to try and make us better. It may have worked.
The "bad" parts of us aren't actually bad at all but misguided. Like any evil-doer in the movies, there is usually a backstory telling how this person became the way they are. Our mind is no different, and there are parts of us that must be utilized and depended on due to our environment. This doesn't mean that we get to blame mom and dad for everything, but we must start to understand that our minds and beliefs about ourselves and thoughts were all formed before our awareness, and now we are stuck with them. Radical acceptance is the skill that says, yes, I have this reaction to life, and when triggered, how do I move forward? Life is not about getting rid of the accumulation of experiences but learning to live with them.
So then, the first step to overcoming sadness is to be aware that you will be sad, love yourself, and take it easy on yourself when you are. This skill to sit with your thoughts and not let them control you will result in that confidence you desire. Give yourself room to be sad. If you don't, you will have problems. The types of issues you will have cannot all be discussed here, but trust me, let yourself feel sad when you experience them. Think of your thinking and think of your brain as the organ it is.
Organs perform their function based on the information we give them. If we eat a lot of refined carbohydrates, the pancreas is left to pick up the tab, and insulin is released into the system. If our mind secretes "bad" and judgmental thoughts, that, too, is a product of the environment it was developed in, starting in the womb. So, you can begin to accept (acknowledge) thoughts as they are, secretions from your brain, and not let them dominate you. The judgment that sadness is wrong when it is necessary is one thought you can work on here.
This all comes down to your mind and how you perceive and interpret things. Confidence comes not with doing things right but with knowing how to adapt. Notice your thoughts, even when they are comparing you to others. Do not think confidence is not having those thoughts. Confidence is learning how to let those thoughts pass. Like leaves on a stream passing you by on an autumn day, the thoughts, too, will pass. This moment, "good" or "bad" will pass, do not hold too tightly onto anything because, in this world, it will pass.