Speaking at a graduation at the US Coast Guard Academy, he made his first public remarks since the Comey memo
Donald Trump has claimed that "no politician in history" has been "treated worse or more unfairly" than he has.
The US president was speaking as he faced calls to be impeached over his handling of the sacking of former FBI director James Comey and his relationship with Russia.
He told new recruits at a coastguard graduation ceremony in New London, Connecticut: "Now I want to take this opportunity to give you some advice.
"Over the course of your life you will find that things are not always fair.
"You will find that things happen to you that you do not deserve, and that are not always warranted, but you have to put your head down and fight, fight, fight!"
Warming to his theme, Mr Trump added: "Never, ever, ever give up - things will work out just fine.
"Look at the way I've been treated lately - especially by the media. No politician in history … has been treated worse or more unfairly.
"You can't let them get you down. You can't let the critics and the naysayers get in the way of your dreams.
"I guess that's why we won.
"Adversity makes you stronger - don't give in, don't back down and never stop doing what you know is right.
"Nothing worth doing ever, ever, ever came easy."
Earlier, Vladimir Putin said he was willing to hand over a transcript of a discussion between Mr Trump and senior Russian officials.
The president allegedly disclosed highly classified information about "terrorism and airline flight safety" while meeting foreign minister Sergei Lavrov and ambassador Sergei Kislyak last week.
However, Mr Putin said Mr Trump did not pass over secrets and dismissed the scandal as "political schizophrenia".
The Russian president added that he was "concerned because it's hard to imagine what the people who produce such nonsense can come up with next".
Questions over the discussion come amid reports Mr Trump asked former FBI director James Comey to drop an investigation into ex-national security adviser Michael Flynn and his ties to Moscow.
Mr Putin said: "What surprises me is that they are shaking up the domestic political situation using anti-Russian slogans.
"Either they don't understand the damage they're doing to their own country, in which case they are simply stupid, or they understand everything, in which case they are dangerous and corrupt."
This latest incident, only a few months into Mr Trump's presidency, has brought a call for his impeachment from Democratic congressman Al Green.
In an interview with ThinkProgress, Mr Green said that following the dismissal of James Comey, Mr Trump "is demonstrating that he has the power to dismiss people summarily, with impunity, unless he's impeached".
Mr Green added: "The president committed an impeachable act when he fired Comey and indicated he considered the Russia thing when he did it."
On Tuesday, national security adviser General H R McMaster said the intelligence sharing was "wholly appropriate" and based on "open source reporting".
Despite reports Mr Trump shared the information in a way that would have allowed the Russians to work out its origin, General McMaster asserted the President "in no way compromised any sources".
He said: "The president wasn't even aware of where this information came from - he wasn't even briefed on the source or method of this information either."
There is no suggestion Mr Trump committed a crime as he has the authority to disclose even the most highly classified information at will.
However, he has been accused of acting unwisely and jeopardising long-standing intelligence-sharing agreements by sharing information without consulting the ally that provided it.