I am afraid you would need to return home and make an application to return to the UK unless there is a human right issue in which case you could try for your status to be legalised in country. It will be an extremely complex process and you will need a good lawyer to represent you.

Being pregant of a British citizen does not give you the automatic right to remain in the UK I am afraid as you should have gone back when your working holiday visa expired.