Boris Johnson has said he “won’t be deterred by anybody” from leaving the EU on 31 October.
The prime minister said he was “cautiously optimistic” of getting a Brexit deal, but the UK would leave by the deadline “whatever happens”.
EU chief Brexit negotiator Michel Barnier said he did not have “reasons to be optimistic” over getting a deal.
Mr Johnson will meet him and European Commission President Jean-Claude Juncker on Monday for talks.
During the PM’s speech, at the Convention of the North in Rotherham, South Yorkshire, he was heckled by an audience member who told him to “get back to Parliament” and “sort out the mess that you have created”.
Earlier this week Parliament passed a law forcing Mr Johnson to ask for an extension to Brexit.
He will have to write to the EU on 19 October to ask for an extra three months, unless he returns with a deal – then approved by MPs – or gets the Commons to back a no-deal Brexit.
But despite the new law, Mr Johnson said he would rather be “dead in a ditch” than ask for an extension.
The Speaker of the Commons, John Bercow, vowed to act with “creativity” if Mr Johnson ignored the law, saying it would be a “terrible example to set to the rest of society”.
MPs managed to pass the law before Parliament was suspended – or prorogued – in the early hours of Tuesday morning until 14 October.
Mr Johnson said the government had made the move so it could hold a Queen’s Speech and put forward its new domestic policy agenda.
But opposition MPs claim it was to stop scrutiny in Parliament of his Brexit plans.
Earlier this week, a Scottish court ruled the prorogation was unlawful as it was motivated by an “improper purpose of stymieing Parliament”.
The government is appealing against the decision and a ruling will be made by the Supreme Court in London on Tuesday.
Answering questions after his speech, Mr Johnson said: “We are working incredibly hard to get a deal. There is the rough shape of the deal to be done.
“I have been to talk to various other EU leaders, particularly in Germany, in France and in Ireland, where we made a good deal of progress.
“I’m seeing [Mr Juncker and Mr Barnier] on Monday and we will talk about the ideas that we’ve been working on and we will see where we get.”
He added: “I would say I’m cautiously optimistic.”