Back up your wallet.
No, your coins won't be lost. If you clean install the newest version of Bitcoin core (which is something I suggest doing), you will still control your funds assuming you have the right wallet.dat
The funds appear as unconfirmed because your wallet client doesn't have the rest of the blockchain i.e. it's missing transactions.