It's all a mind game.
Don't even let the "loser" thought enter your head. It could get stuck there. Instead, when you decide to walk, think of it as cross-training. Seriously. Take the opportunity to stretch out any tight muscles (for me it's the quads). Walk with purpose and intent, with your head high to get oxygen into your lungs.
That way, when you get to the top of that monster, you are refreshed & ready to continue your adventure.
Two other things to try. 1) You could wait 'til you have a good tailwind. 2) Tackle the grade when you are mad enough to chew nails and use the anger to fuel you up.
After you get up the first time, you will know you can and it will get easier.
Give big space to the festive dog that make sport in the roadway. Avoid entanglement with your wheel spoke.
(Sign in Japan)
1978 Raleigh Gran Prix
2003 EZ Sport AX