No one can baptize himself. Self-baptisms (also known as “auto-baptisms”) are automatically invalid, and anyone who was initially baptized in this way would have to be baptized (unconditionally) by someone else (Denzinger 413 [DS 788]).
Another person must administer the sacrament to symbolize the fact that the person cannot reach up and bring down God’s grace upon himself. God’s grace must be given to a person; it cannot be taken from God.
However, for someone in a situation where no one is available or willing to baptize him, God will not hold that against him. He will count his desire for baptism in place of the baptism itself and give him the grace anyway. This is because God loves us and wants us to have his grace, even when the normal method of communicating it is unavailable.
Thus God wants the communication of his grace properly symbolized (in the normal rite by which it is communicated) but wants it to be communicated even when this symbolism is not possible (when the normal rite is not available). Thus the Council of Trent taught that “justification . . . cannot be effected except through the laver of regeneration or a desire for it” (Decree on Justification 4).