Have you ever gotten so fed up with everything that you could not help but force a manic grin... only to get in a better mood?
As it happens, our body and mind mirror each others in many ways. When we are happy, we smile. But if we smile when we are not happy, and manage to hold it, we tend to become happier.
One of the things our brain loathe is inconsistency. A lot of mechanics are put into force to resolve inconsistencies caused by imperfect senses, or imperfect memory. We post-rationalize all kinds of things: If we do something out of character, we'll happily invent an explanation for how it fits into our world view and believe it.
So also with body-language: If we smile in spite of a horrible mood, surely there must be something to smile for? So our mood will get regulated. If, on the other hand, we get caught up in the mood, our body language will be affected accordingly.
We are used to this: We pose aggressively when we get angry, we slink together when we are sad or scared. We are less used to the reverse: "Manipulating" our moods and feelings by changing our body language.
Yet we do it every day.
When you are confident about your position, you adopt body language accordingly, and this in turn reinforce your confidence: You must be confident, since you walk with a swagger and your head held high.
You can consciously take advantage of this: Practice the body language. Observe confident people, attractive people, happy people. How do you know they are these things? A substantial part of it is their body language. Now copy it.
Trying to walk around like a super-confident guy will not make you confident overnight, but it will help your mind question your lack of confidence. It will create a new signal saying "hey, my shoulders are high and I'm taking up lots of space, how come I'm not feeling confident? That doesn't seem right.
If you have ever role played, or taken part in a play you may have noticed your demeanour and the way you act change to match the role. Things you'd never do out of costume becomes possible, or even easy - you act to match the outfit and the role.
Changing your boy language is like putting on a costume. At first it is not "you". But it changes the way you are able to act. And eventually you will find yourself settling into a new equilibrium where your body language has shiften closer to where you want to be.
As with everything else, it is practice: Just decide to smile more, or to adjust the way you stand and walk. Pay attention - be mindful - as much as you can manage. And when (not if) you notice you slip up, just gently notice it and push yourself back into your preferred position and try again. Over time the slip-ups will be fewer and you will maintain your preferred posture and facial expression longer and with less effort.