Article II
and he shall have Power to grant Reprieves and Pardons for Offenses against the United States, except in Cases of Impeachment.
The President, Vice President and all civil Officers of the United States, shall be removed from Office on Impeachment for, and Conviction of, Treason, Bribery, or other high Crimes and Misdemeanors.
It is clear that if a federal judge, or agency head is being impeached, the president can't intervene by issuing a pardon for the crimes for which they are being impeached.
If Trump issues himself a pardon, it's a constitutional question for the courts. If the house as a result, impeaches Trump, his pardon of himself becomes void by the impeachment exception. And it only takes a simple majority to impeach a president.
Whether the senate convicts or not, Trump would face criminal charges upon leaving office.