Recall that prior to 1914, Senators were elected by the legislature, rather than popular vote. The election would occur during the legislative session, which might be a long time before (or after) the start of senatorial terms (March 3 of odd-years).
The following might be helpful.
This is the party division for each congress.Party Divisions
This shows the sequence of senators for each of the 2 seats for a state, including party affiliation. It has the information you want, though you would have to work through each state.Senators By State