How is laughing gas produced in the Nef reaction? I can't think of a mechanism for this reaction to give laughing gas. 

Attempt:

I used the base to take out the acidic hydrogen at alpha position with respect to nitro group, but that makes the intermediate formed even more unstable. What should be the proper mechanism?
The Nef reaction does not produce nitrous oxide directly. It produces nitroxyl as a reactive intermediate, which rapidly decomposes via a bimolecular reaction to nitrous oxide and water$^{[1]}$. You are correct that the base removes the alpha hydrogen; the nitro group is more than capable of accepting this negative charge. The crux of the Nef reaction is this:



The mechanism for the formation of nitrous oxide is as follows:





$[1]$ Wikipedia: Nitroxyl, Reactions