... ;to appear merciful, faithful, humane, religious, upright, and to be so, but with a mind so framed that should you require not to be so, you may be able and know how to change to the opposite.
is a disjunct compound non-finite clause that elaborates upon what was meant by "to appear to have them". Repunctuation might make it clearer:
Therefore it is unnecessary for a prince to have all the good qualities I have enumerated, but it is very necessary to appear to have them. And I shall dare to say this also, that to have them and always to observe them is injurious, and that to appear to have them is useful—to appear merciful, faithful, humane, religious, upright, and to be so but with a mind so framed that should you require not to be so, you may be able, and know how, to change to the opposite.
There is a danger in always being merciful, faithful, humane, religious, and upright. You can act so sometimes, or even most of the time, but you need to have the cast of mind that will allow you to be umerciful, unfaithful, inhumane, irreligious and devious now and then, as needed.
to appear to have them. Infinitival clauses can serve nominally as the subject of a verb: To err is human, to forgive, divine.
So, "{to appear {to have them} } is useful".
We could also say "appearing to have them is useful"., and could restate the bolded clauses using the -ing form:
... and that appearing to have them is useful—appearing merciful, faithful, humane, religious, upright, and being so but with a mind so framed that should you require not to be so, you may be able, and know how, to change to the opposite.
Thus, you could understand the compound infinitival clauses
to appear merficul ...
and
to be so but with ...
as a nominal standing more-or-less in apposition to "to appear to have them".
Depending on how broad or narrow your definition of apposition is, of course. If you insist that only bona-fide nouns can stand in apposition, then not. But if you allow for any construction that functions nominally, then yes.