I wanted to know whether the POTUS could pardon himself if he/she is criminally charged with treason or some other wrong doing.
First, there is no definitive correct answer to this question because it has never happened over the course of 45 Presidencies. But, it certainly could come up. If the President purports to pardon himself for a federal crime and is then prosecuted, the judicial branch would have to decide if the pardon was valid.
But, I would disagree with the answer from @user6726, and would instead take the position that the concept of a pardon inherently implies that one is pardoning someone else. This is why President Nixon, when he resigned, had Vice President Ford, when he became President upon Nixon's resignation, pardon him, rather than pardoning himself. President Bush, in connection with the Iran-Contra scandal also took the position that he did not have the power to pardon himself.
Basically, a pardon is an event that is ordinary conceived of as involving two persons, a giver of the pardon and a recipient. Also, recognizing the power of a President to pardon himself or herself would be to give him or her impunity to disregard the law not just in areas where he or she has Presidential immunity, but in anything that he has ever done in his life. (Also, the President can only pardon federal crimes, not state crimes.)
There is, of course, an academic literature on the subject (which none of the answers in the PoliticsSE refer to and which the other answer here does not refer to). The two leading law review articles addressing the question are:
Brian C. Kalt, "Pardon Me: The Constitutional Case against Presidential Self-Pardons" 106 Yale L.J. 779 (1996-1997) (obviously adopting my position). An expanded version of this article became a chapter in a book called "Constitutional Cliffhangers: A Legal Guide For Presidents and Their Enemies" by the same author.
Robert Nida and Rebecca L. Spiro, "The President as His Own Judge and Jury: A Legal Analysis of the Presidential Self-Pardon Power" 52 Okla. L. Rev. 197 (1999) (closed access). It opens with the following language (in part):
[C]an the President pardon himself for criminal acts committed while or before holding office? Article II of the Constitution prohibits a President from using the pardon power to overturn an impeachment.5 The Framers of the Constitution placed only this limitation on the ability of the President to exercise his pardon power,6 and the only sanction for the abuse of the pardon power is the removal of the President through impeachment.7 The Constitution is silent, however, as to whether the President may grant himself a pardon from prosecution and, if so, when such a pardon may be issued.8 In the over 20,000 instances that Presidents have used this exclusive power,9 no President has used this power to pardon himself.10
One viewpoint is that a presidential self-pardon is inherently inconsistent with "natural law," which proclaims that one may not judge oneself.11
This article is cited in Comparative Executive Clemency by Andrew Novak who calls it an unresolved question but believes many legal scholars believe that it is possible.
Leading Constitutional law scholar Adrian Vermeule analyzes but does not resolve the issue in his book "The Constitution of Risk".
A 2017 Vox review from 15 legal experts is here. Their views are mixed and nuanced.
A 2017 op-ed in the Washington Post from a former member of Congress who was involved in the impeachment proceedings for President Nixon says "no."
Another review of expert opinion in 2017 can be found here. This also noted a dispute within the realm of academic legal opinion.
There has also been debate over whether treason is treated differently for pardon power purposes than other federal crimes, but the precedent of the pardons issued after the U.S. Civil War pretty definitively resolved this question in favor of the power of the President to pardon treason, so the nature of the federal offense wouldn't matter.
Note also that the pardon power is not limited to cases where criminal charges have been brought or convictions have been obtained. This issue is irrelevant to a President's self-pardon power.
The Constitution does not limit the presidential power of pardon to "people besides himself": the only limit is that the president cannot immunize a person against impeachment, though he can pardon the crime underlying an impeachment (which has no effect on impeachment). So if the person is still POTUS, and had not been removed from office, then he could pardon himself. It is more likely that this would happen before the conviction. This also assumes that the crime is a federal crime (like treason), since the power only applies to federal law.