Its only natural to lust after connections you have made with people who are willing to be real, open and honest.
In my opinion you need to forget this girl you met who has a boyfriend. For one, she might have just been saying nice things so you feel better, you never know with people, take the compliments, trust that shes a great girl but dont waste too much time thinking 'i wish i could have her specifically'. My point is, you dont know her properly. But you found in her characteristics you like, which will help you recognize these characteristics in other girls.
Secondly, shes taken, she might end up single one day, but its not worth even thinking about because girls like that might seem in short supply but they dont randomly come from no where, im guessing they are usually the product of good families, or from self reflection and facing their issues, there will be more. There are plenty of self reflective people in this world. Oftentimes people are forced to face their demons after having a few life crises, Im betting another round of women at age 30 and 40 will appear fresh out of counselling and ready to find the nice guys :) haha.
Try to stand up tall as a gentleman - you dont need this girl you met to validate you as a good guy - you know you are. Her opinion of you makes no impact on your life or on who you really are. Let it come from within, trust me you would know if you werent a great guy, so please try to remain confident that personality will eventually win out for you in one way or another.
You sound like you have issues trusting in yourself and having faith in the future. (I am giving advice here that I cant follow haha, but its still good advice) try to work on that. You will have better luck with girls if you dont try to overcompensate for a lack of self worth. Get the self worth first :) good luck seriously. Its a long and hard process but it doesnt often work any other way so really in my opinion you have no choice but to buckle down, face your own demons, get on with it, and be the best you you can be, that will help every area of your life. Including dating.
From my experience, its hard to begin with, but then it gets really fun!