A Swiss national was arrested in Iran and was accused of spying committed suicide in prison on Thursday, the chief justice of Iran's Semnan province was quoted as saying by Iran's semi-official Tasnim news agency.