I empathize with your situation. However, by your own comments it appears that you're already on your way to finding that perfect new home. You learned a valuable lesson that all home buyers should take note and take action: get your financing in order by getting pre-approved with a reputable bank or mortgage lender BEFORE you start looking at homes. I trust that since missing an opportunity to purchase your dream home, you have your pre-approval letter in hand for the next deal, right?
Occasionally, I meet some resistance on this topic from a new buyer client and sometimes even seasoned home buyers and past clients. A lot has changed in the mortgage industry and underwriting guidelines over the last year. Know how much home you can comfortably afford and qualify for before shopping. It will spare you the heartbreak and save precious time especially when you do come across "the right one."
I am curious to know whether or not you were (or are now) working with a Buyer's Agent - a real estate professional dedicated to representing you and you alone in the real estate transaction? Finding an experienced Realtor professional to guide in what is often the most expensive purchase of one's life is invaluable. After all, in most cases the seller has chosen a real estate professional to represent him and his/her best interest when selling a home. Why not have the same level of professional representation and have access to expert advice and market data when buying a home? And, in most cases, your Buyer's Agent will save you time, money, and frustration. It's really a no-brainer.
Back to your original question & request for advice: How to take a disappointing situation and turn it into a positive learning experience? The first step is to recognize your short-comings or mistakes (which I'd say you have already done). Make sure that your financing is in order with your lender. Select a Buyer's Agent who is knowledgeable of the area of interest (if you haven't already). Give your agent clear direction on what you like (or do not like) in a home. Both you and your girlfriend should independently create a list of your top wants/needs/must-have's; then, compare notes to see what areas you rate highly of importance. Create a scapbook or dreamboard of things you and your girlfriend like and want in your next home by cutting & pasting photos of those features and things. Look at your collection every day and dream about your home-to-be. Finally, schedule time each week to meet with your Realtor to go look at some candidate homes for sale. Now that school is about to be out and the Summer selling season is here, you will begin to see more homes going on the market; thus, more inventory/selection to choose from.
Best wishes in your home search.