well the three times that you llost your erection are almost certainly because of the drink! it doesnt mean you have a problem, most guys cant get it up when they're drunk, that's where the term 'brewers droop' comes from! so you can discount those times.... that isnt erection dysfunction as such. if you are drunk it is just not gonna happen lol
if you are able to get and maintain an erection and reach orgasm by yourself without any problem, then yes, the problem is in your head. it is most likely related to nervousness. every man goes through this at some stage of his life, you needn't feel ashamed. just try to relax!
quite often a problem shared is a problem halved. talk to your girlfriend about it openly and if you have concerns get them out in the open. i know it's hard to discuss embarrassing things like this, but she's already witnessed you losing your erection first hand so it's not like you'll be telling her some secret she doesnt already know! if the pressure to perform is getting to you and it makes it easier then take sex off the cards for a while. take the focus away from sex itself and instead focus on other things. for example, spend an evening in together, give each other massages, touch her, explore one another's bodies, maybe give her oral sex, etc. when you are ready to engage in full sex i'm sure you will know!
you have only been with your girlfriend for a month, this is a relatively short period of time. once you get to know her better you will build up trust, and anxiety won't be an issue for you anymore. the first time with someone new is always strange and nerve racking, things will only get better with time. i'm quite confident that the only thing wrong with you is nerves and this is natural. just try to relax and take things slow and it won't be long before you're back on track