WASHINGTON — Elliott Abrams, a neoconservative who has long argued for an activist foreign policy that spreads American values around the world, was advising Republicans just last spring to “keep your distance” from Donald J. Trump and offering advice about what the party should do after the “Trump collapse.”

On Tuesday, Mr. Abrams is set to visit President Trump in the White House to determine whether there is a job for him in the new administration, as the State Department’s No. 2 official.

As part of the vetting process to see whether Mr. Abrams will serve as Secretary of State Rex W. Tillerson’s deputy, his writings have been scrutinized in a White House suspicious of anyone who was not a Trump loyalist from the beginning.

But the advantage of picking Mr. Abrams is clear: He knows the inner workings of the department, he served under Ronald Reagan and George W. Bush, and, like Mr. Trump, he is often a critic of the Washington foreign policy establishment. Of course, he is also a member of it.