Annoying but you have proof of the visa etc all at immigration. Go back to them and ask for copies if you don’t have them and then go to the embassy who should be able to sort this and save you returning. After all they are there to represent the British people in Thailand.