I lost my passport in Bangkok a month ago, here is what was the process to get a new one and get my visa transferred to the new passport.
1. Go to the police station to declare your passport stolen/lost. All you need is a photo of your passport and they'll do the rest
1. Go to your embassy to apply for a new one, with the original and a copy of the declaration from the police. The documents you need vary depending on the embassy so check on their website. But in most cases you're going to need ID photos and a proof of residency. You will also need to contact them directly or go there in person to get an emergency appointment. The French embassy gave me an appointment the next day, and it took 3 weeks to get the new passport.
1. To transfer the visa to your new passport, at the moment you need to go to the 3rd floor at IT Square Laksi, which is 10 minutes drive from Chaengwattana.
1. You will need the following documents
* Application form (you'll find it there)
* A copy of police station report
* A copy of your old passport
* A copy of your new passport
* Letter from the embassy of the foreigner to the Immigration Bureau requesting cooperation for visa stamp in the new passport of the foreigner.
In my case, they also asked for a ticket flying out of the country.
The transfer is free.
Getting my visa transferred to the new passport took 5 hours at the immigration. So get in early, and/or bring your laptop.
Hope it can be of help to some of you. Feel free if you have any questions
TLDR : Answer Summary
If you lose your passport in Thailand, you must declare it lost at a police station and then apply for a new one through your embassy. The documents needed vary by embassy but generally include a police report, ID photos, and proof of residency. Once you receive your new passport, visit IT Square Laksi to transfer your visa. Required documents for the transfer include the application form, copies of the police report, old and new passports, and a letter from your embassy. The transfer process is free but may take several hours, so plan accordingly.