Police in the canton of Appenzell Ausserrhoden said in a statement, the 33-year-old pulled out a gun as police searched his home in the small town of Rehetobel as they looked for a suspected cannabis plantation.
The gunmen fled but was eventually cornered at a location near his home.
According to police , he shot himself after a standoff lasting several hours, which included negotiations over the telephone.
The man, clad in military clothing, said he had explosives in a rucksack which he threatened to detonate. Police searching his home found gun publications.
The shootout had no link to terrorism but is a rarity in usually tranquil Switzerland .
Gun crime is infrequent, even though the country has one of the highest rates of firearm ownership in the world.
Citizens are allowed to keep their army-issue weapons at home outside periods of mandatory military service.
The law allows any citizen aged over 18 to possess arms under certain conditions and there are an estimated two million weapons in private hands among a population of about eight million.