Praise be to Allah.
Before we find out what the Quraan says about despising others because of their origins, we should know what the Quraan says about having girlfriends. Allaah says (interpretation of the meaning):
Wed them with the permission of their own folk and give them their mahr (dowry) according to what is reasonable; they should be chaste, not adulterous, nor taking boyfriends [al-Nisaa 4:25]
In his commentary on this aayah, Ibn Katheer (may Allaah have mercy on him) said:
Muhsanaat [translated as chaste] means that they should be pure, not indulging in zinaa (unlawful sexual conduct), hence they are described as not being musaafihaat, which means promiscuous women who do not refuse anyone who wants to commit immoral acts with them Ibn Abbaas said: muttakhidhaati akhdaan means lovers. Al-Hasan al-Basri said: It means a (male) friend. Allaah has also forbidden this, meaning marrying her so long as she is in that situation
Now that you know the Islamic ruling on this matter and are sure that what you have done is haraam and sinful, we will now move on to what Allaah says about despising others for their origins. Allaah says (interpretation of the meaning):
O you who believe! Let not a group scoff at another group, it may be that the latter are better than the former; nor let (some) women scoff at other women, it may be that the latter are better than the former [al-Hujuraat 49:11]
Allaah has not created mankind in nations and tribes so that they may be proud and despise one another, but so that they may be distinguished from one another and thus get to know one another. Allaah says (interpretation of the meaning):
O mankind! We have created you from a male and a female, and made you into nations and tribes, that you may know one another. Verily, the most honourable of you with Allaah is that (believer) who has taqwa (i.e. is one of the muttaqeen the pious). Verily Allaah is All-Knowing, All-Aware. [al-Hujuraat 49:13]
Ibn Katheer (may Allaah have mercy on him) said, in his commentary on this aayah:
Here Allaah is telling mankind that He created them from one soul, from which He created its mate this refers to Aadam and Hawwa (Adam and Eve) and made them into nations, which are bigger than tribes. Beyond the tribe there are other smaller units and divisions, such as families and clans. An alternative interpretation is that nations refers to the non-Arabs and tribes refers to the Arabs. All people are equal with regard to lineage because of their descent from Aadam and Hawwa, upon whom be peace, but some may be better than others in religious matters, i.e., in obedience to Allaah and in following His Messenger (peace and blessings of Allaah be upon him). For this reason, after forbidding envy and scornful attitudes towards others, Allaah pointed out their equality as human beings: O mankind! We have created you from a male and a female, and made you into nations and tribes, that you may know one another i.e., that they may know one another by referring to their tribes. Mujaahid said that this meant by calling a person So-and-so the son of So-and-so, from such-and-such a tribe. Abu Hurayrah reported that the Messenger of Allaah (peace and blessings of Allaah be upon him) was asked, Which people are the most honourable? He said: The most honourable in the sight of Allaah are the most pious (those who have most taqwa). They said, That is not what we were asking about. He said: The most honourable of people is Yoosuf the Prophet of Allaah, the son of the Prophet of Allaah, the son of the Prophet of Allaah, the son of the Friend (khaleel) of Allaah. They said: That is not what we were asking about. He said, Are you asking about which lineage of the Arabs is most honourable? They said, Yes. He said: The best of you at the time of Jaahiliyyah are the best of you in Islam, if they understand properly. Abu Hurayrah (may Allah be pleased with him) also reported that the Messenger of Allaah (peace and blessings of Allaah be upon him) said: Allaah does not look at your outward appearance or your wealth, He looks at your hearts and your deeds.
Further information that is relevant to your question may be found under #1805 and #1114. We ask Allaah to bless us and you with strength and goodness, and to keep us all away from that which is forbidden. May Allaah bless our Prophet Muhammad.