Did the government consider the assassination of the President to be a contingency worth planning for? Did any plans exist at the time of Lincoln's assassination?
It was definitely something considered from the very start. However, presidential security wasn't exactly the best, and that hadn't yet become as big a deal as it is today. For more on that, I did a write-up here that explains security details in the past.
One thing to note is that Lincoln was not the first president to die in office, or the first to have an attempt on his life (that we know of). Andrew Jackson, for example, had an attempt on his life that reputedly failed when both of the pistols misfired and Jackson (and others) ended up rushing the guy. Lincoln did have a security detail, but it was a very poor one, and mostly handled by locals and people who were with the President.
The government had planned for things like the death of a President, obviously. Harrison, after all, had died roughly 30 days into his first term. It was not something that hadn't been dealt with, in a way. Succession had already been explained in the Constitution. I did a write-up on that here, but the short version of it is that before Lincoln, when a President died, the VP would take over according to the constitution. The VP slot stayed vacant (this was changed in 1967). They had a whole line of succession (which has changed over the years). The law that dealt with what happened if a President died (prior to its alteration in 1886) was written in 1792, saying:
Section 9. And be it further enacted, That in case of removal, death, resignation or inability both of the President and Vice President of the United States, the President of the Senate pro tempore, and in case there shall be no President of the Senate, then the Speaker of the House of Representatives, for the time being shall act as President of the United States until the disability be removed or a President shall be elected.
National security officials, however, didn't seem too concerned with the possibility of an assassination. If they were, they definitely didn't reflect it in implementing security details. The Secret Service didn't even start guarding presidents until 1901, and only 3 were even assigned then to the job (only 1 was around at a time, too!). As mentioned in a letter where a poet talked about the attempt to assassinate President Jackson in 1835:
Richard Henry Wilde, a poet from Georgia and a Representative in the House at the time, wrote in a letter that same day that the President attempted to rush the would-be assassin with his umbrella or stick (confusion persists), and that everyone from Congressmen to Naval Assistants tried to rush the attempted murderer, Richard Lawrence.
That was about the extent of "worry" about security for the President that I've found. It simply didn't seem to be something anyone was really, truly, concerned enough about to make it all that important. The Secret Service we know today is nothing like the start of the organization, or the security details of the past. Instead, things like the National Detective Bureau and the National Detective Agency (the latter is the Pinkertons, if you've heard of them) were hired to protect the president, along with local law enforcement/watchmen who would be "around".
Sources:
The Attempted Assassination of President Jackson: A Letter by Richard Henry Wilde Edward L. Tucker The Georgia Historical Quarterly, Vol. 58, SUPPLEMENT (1974), pp. 193-199
The United States Secret Service. An Administrative History Norman Ansley The Journal of Criminal Law, Criminology, and Police Science, Vol. 47, No. 1 (May - Jun., 1956), pp. 93-109
Presidential Assassinations and Assaults: Characteristics and Impact on Protective Procedures Frederick M. Kaiser Presidential Studies Quarterly, Vol. 11, No. 4, Presidential Management: The Importance of Presidential Skills (Fall, 1981), pp. 545-558
Eyewitness Account of Lincoln's Assassination Helen Dub Journal of the Illinois State Historical Society (1908-1984), Vol. 39, No. 3 (Sep., 1946), pp. 366-370
And other various sources on Presidential Succession.