The Senate finally passed its $5.2 billion jobs bill yesterday after breaking an impasse over withholding of taxes on dividends and interest that had held up the emergency measure all week.

The vote was 82 to 16. The bill, which goes to conference with the House, also contains $5 billion needed to continue paying unemployment benefits next week in 27 states and the District of Columbia.

Sen. Robert W. Kasten Jr. (R-Wis.), who tied up the jobs bill for four days with his amendment to repeal the withholding provision now scheduled to take effect July 1, agreed to let the bill go forward after the leadership gave him guarantees that his proposal can go to the floor for debate April 15, the income tax filing deadline, as part of a pending trade reciprocity bill.

After passing the jobs bill the Senate returned to the $165 billion Social Security rescue plan, on which it is scheduled to continue work today.

The House has passed a $4.9 billion jobs and recession relief bill. It also contains funds to enable the 28 threatened jurisdictions to continue paying unemployment benefits next week.

The jobs bills are Congress' first effort of the year to cope with the recession. Members of both parties have said other bills will follow, and some, providing aid to homeowners and farmers, have been reported out by committees for floor action.

As passed by the Senate yesterday, the jobs bill provides funds to accelerate public works projects ranging from highways to prison modernization and Indian housing. It also provides $1.2 billion in extra federal revenue sharing plus some lesser amounts for summer jobs for youth and health services for the poor.

White House officials have indicated that they would like the bill passed by the Republican-controlled Senate cut back a little, toward the level passed by the Democratic-controlled House.

Senate leaders say they believe that the bill that comes out of the conference committee will be acceptable to President Reagan. He had warned, however, that he would veto the bill if it contained Kasten's amendment repealing the withholding law.

Kasten told reporters he is happy with the arrangement he worked out with Majority Leader Howard H. Baker Jr. (R-Tenn.), and that as soon as the reciprocity bill is called up April 15 he will file a debate-limiting cloture petition to assure a vote on his amendment and block another filibuster against it.

Senate Finance Committee Chairman Robert J. Dole (R-Kan.) led such a filibuster this week to keep the Kasten amendment from coming up; most vote counters thought it would pass easily if it did. Most also think it would pass if put to the test in the House, where Democratic leaders have been resisting it.

The banking industry has lobbied hard to repeal the withholding law, which is expected to bring the Treasury about $4 billion a year, partly in taxes that now go unpaid.

But while Kasten insisted that he was pleased with the arrangement, Sen. Russell B. Long (D-La.) indicated that he thought it was a bad deal. He said that because the reciprocity bill technically is a revenue measure, and revenue bills technically must originate in the House, "the chances of that bill coming back from the House are little or none." Sen. Jesse Helms (R-N.C.) called it "a legislative corpse."

However, Helms, Long and others said there is nothing to stop senators from offering withholding repeal amendments to the pending Social Security bill or any other that comes along, and that this might happen.

In the House, meanwhile, a discharge petition to force a withholding repeal bill out of the Ways and Means Committee was filed yesterday by Rep. Norman E. D'Amours (D-N.H.).

House Speaker Thomas P. (Tip) O'Neill Jr. (D-Mass.) told reporters that the House probably would have to vote on the repeal amendment at some time.

Opponents of the Kasten amendment, including Dole, hinted in a series of statements that Kasten might have agreed to withdraw his amendment from the jobs bill because enough votes had turned around to block it in a series of parliamentary duels.

Kasten did not concede this, but did tell reporters that the vote would have been "very tight" if the chair had ruled his amendment non-germane and he had appealed the ruling.