First you start using actual successes you have achieved as affirmations. Then slowly you push that boundary a little bit ahead with your imaginations and visualisation in your head, while keeping a good control over emotions (let them be what they need to be, but channel them, don't let them take over you).
E.g I do this all the time as a powerlifter trying to hit a certain competition lift PB, say in the squat. I first start with an actual comp squat I've done that was very good and visualise myself doing it over and over again, each time I make the form in my head a little closer to perfection than it really was. Then I start adding weights to the bar to make it closer to the weight I will be attempting in a near future comp. This can be a slow process when it gets to the number I really want. Initially, I'd fail the lift outright in my head a few times. Then slowly I'd get it, but it'd look really hard. Eventually it'd look easier and easier. When I finally get to do it at a real comp, it'd look almost exactly like how it's been played out in my imaginations.
I've coached that to my lifters with good success.
I've also been mentoring a young bloke on this. Last session, I simply taught him how to walk. First I told him to walk like he just won a small bet of a few hundred dollars (actually happened to him, as he told me in the past). Then walk like he just arrived at his favourite holiday destination; like he just got a job; just got laid etc. His body language by the end was night and day different to when he started the session (he alternated between an I just stole something guilty look and a stick up his arse look), and that was just within about 20 minutes.
TLDR: start small and build it up patiently.