Southern Pacific served the old Third and Townshend depot (right near today's 4th and King Street Station) with tons of LD trains.
No, Charles, you did not understand correctly, and cpotisch is incorrect about "tons" of LD trains.
The only LD trains that went directly into San Francisco were Coast Line trains. The Coast Daylight, the Lark, the Starlight, among others, to LA. Just like 4th & King, 3rd & Townsend, one block to the east, was primarily a commuter station for the Peninsula commutes. The only non-commute rail service serving San Francisco directly just before Amtrak were the Coast Daylight to Los Angeles and the Del Monte to Monterey.
Any other long distance service, aside from trains heading south down the Coast Line, trains serving all points north and east as well as trains heading south via the inland route through the San Joaquin Valley, terminated at the Oakland Mole. Passengers heading to San Francisco transferred to SP's ferries at the Mole, arriving in San Francisco at the Ferry Terminal. Arguably, San Francisco's primary rail station for long distance service was the Ferry Terminal, not Third & Townsend. Trains such as the City of San Francisco, the Overland, the Cascade, the Shasta Daylight, the Owl, the San Joaquin Daylight all terminated at the Oakland Mole. If you want to see someone make that connection, watch Frank Sinatra's journey in the first 5 minutes of "Pal Joey".
After SP terminated ferry service in 1958, SP instituted bus service across the Bay Bridge between their San Francisco Third & Townsend station and the Oakland station at 16th & Wood to provide connections to their long distance trains. The arrangement was much like Amtrak uses today, although SP only served Third & Townsend, not the multiple bus stops in the City that Amtrak does.
Amtrak wanted to through route the former Coast Daylight and Cascade trains on Amday, which required the former Coast Daylight to be rerouted out of San Francisco and into Oakland. Since the Cascade only ran 3 days a week, and Amtrak initially kept that 3 day a week schedule, the "Coast Daylight/Starlight" (its initial Amtrak name) continued beyond Oakland, the other 4 days it terminated in Oakland. Today's Coast Starlight is the result of the combination of those two trains, the Coast Starlight and the Cascade.
Also, WP's California Zephyr used the Oakland Mole and SP's ferries. After 1958 they also used SP's Third and Townsend station but with their own bus service that went to WP's Middle Harbor Road yard to connect with the train. Santa Fe had their own terminal and their own buses.
As a minor point, since San Francisco was "Milepost 0" for SP, there were actually two locations for "Milepost 0". For the Coast Line, it was bumper post at Third & Townsend. For everything else, it was the hinge of the ramp at the Ferry Building.