welcome to Wefugees and thank you for your question.
To marry in Germany you need to provide a number of documents. These include a passport, a birth certificate and a certificate of no impediment (to attest that you are eligible to marry and most significantly, to proof that you are not married or not married anymore). You may need to provide further documents according to the marriage laws of your home country. Moreover, documents from some countries need to be certified by the German Embassy prior to marriage. So, where are you from?
Yet according to Niedersachsen Flüchtlingsrat e.V., only imminent marriages lead to a suspension of deportation. To proof that the marriage will be consummated soon, you need to provide a document from the register office and proof that the marriage will take place in the near future. Also, there might be checks whether it is a marriage of convenience, which means that you might be interviewed and asked about your relationship as well as visits to your home.
Source: https://***.nds-fluerat.org/leitfaden/8-perspektiven-nach-negativem-abschluss-eines-asylverfahrens/62-aufenthaltsrecht-aus-anderen-gruenden/ (in German)
I am not sure to what extent it matters that your partner has Polish citizenship and does not live in Germany. However, once you are married to a EU citizen, you are able to move and work freely in the EU and hence in Germany.
I will link your question to our lawyers @Marcel and @Steven , who can help you with their expertise.