ANSWER:
You must not feel disheartened as this was destined by Allah and a believer is always content with Allah’s decree.
A menstruating woman must not enter the masjid, not even the harmain. If you feel that you will become pure before leaving, you may assume your Ihram while putting a condition that if your menses didn’t finish before leaving, you can take of your Ihram without any expiation. But if you are certain there won’t be enough time, then don’t get into the state of Ihram and in Sha Allah you will be rewarded for that.