Welcome to Android Central! It did a factory reset on its own? So you had to go through the whole Setup Wizard again? That's not a good sign--it could mean there's a serious issue with your firmware or hardware. Hard to know if it will happen again unexpectedly. You may want to contact Samsung about this.

Were your contacts associated with your Google account, or with the local Phone account? It's always best to associate contacts with Google, because they get synced immediately. So if something catastrophic like this happens, the contacts are safe in the cloud and can easily be synced back to your phone If they were only associated with the Phone account and you never backed them up using other 3rd party software, then they're gone.

If all of your photos were on Internal Storage, then they are also wiped. If they were on the SD card, then unmount the card (in Settings>Storage), remove it, and insert it into your computer's reader. Does it find any of the photos? Always remember to sync or backup your photos regularly, if they mean anything to you. Phones fail, and so do microSD cards, so if that's the only place the photos are, you run the risk of losing them at a moment's notice.

Your SMS history is also probably gone. You could try contacting your carrier to see if they're available on their server, but I doubt it. Sorry!

As far as contacting Samsung, the phone is still under a warranty that should be honored by your carrier. That should be easier, because most of them will just give you another phone. (It's refurbished, but that just means that someonne actually checked everything on it, it wasn't checked by computer - which doesn't check everything. One of my more than year old Note 3s is a refurb, and I abuse it terribly software-wise.)