A carefully negotiated bipartisan immigration deal has collapsed in Congress, with lawmakers from both parties blaming the other side for putting election-year politics ahead of policy.