faint positive, period 7 days early - miscarriage?

EmJay
So for the last couple days I was feeling off with dihorrea, nausea and tiredness. Went to the doc to get some medication and that was it. Then to my surprise I got my period the next day which is much earlier than I usually get them (I'm normally very regular!) 7 days early. I also noticed my period was heavier and more painful than usual and then it hit me... maybe I was pregnant and fucked it up by taking medication? So I took a pregnancy test even though my period had already arrived and she's enough there's the faintest line.
Could I have actually been pregnant?
I'm feeling very disappointed and angry at myself right now 😭