A UK right wing lawmaker who wound up sprawled unconscious on the floor of the European Parliament after announcing his intention to run for his party's leadership has resigned.