In a letter to NHS England over the weekend, BMA leaders hit out at online posts made by Dr Madan under a pseudonym, which appeared to dismiss concerns over the closure of small practices.
More than 900 GP practices have closed or merged over the past five years, GPonline analysis of data from NHS Digital show, with average list sizes rising by almost 20% to 8,279.
GPC deputy chair Dr Mark Sanford-Wood wrote to NHS England warning that comments posted online by Dr Madan suggesting GPs should be 'pleased' when small practices closed had 'compromised his integrity'.
In a statement published on Sunday, Dr Madan wrote: 'It is clear to me that, sadly, I have lost the confidence of some of my colleagues, and I have therefore decided to resign my NHS England position.
'As part of my attempts to challenge the negative views – and even conspiracy theories – held by a small but vocal minority in the profession I posted on an anonymous online forum used by GPs. It was never my intention to cause offence but rather to provoke a more balanced discussion about contentious issues acting as a devil’s advocate.
'I wish to make it categorically clear that these comments are not a reflection of NHS England policy, and it is now clear to me that trying to move the debate on in this way is not compatible with my role as director of primary care. Supporting general practice is too important an issue to allow it to be mired in unnecessary controversy.
'I would like to apologise unreservedly to those who have been upset, particularly in smaller practices.'
The Sun newspaper revealed over the weekend that Dr Madan had been posting comments on the Pulse website under a pseudonym.