I live in a section of the country which used to belong to Mexico and before that, Spain, since the 17th century. However, it really belonged to those who were already here, such as the Tohono O'odham, the Apache, the Yaqui, the Navajo, and many others. Spanish settlements were sparse, although Texas was starting to grow, although Americans were determined to expand all the way to the Pacific.
The problem is, we didn't really stop there. After the Gadsden Purchase in 1853, the border with Mexico was set, but we still continued to interfere in less "official" ways, not just in Mexico, but all through Latin America. The Spanish Empire was all done, but American hegemony filled the power vacuum. Our reach extended all up and down the hemisphere - and the impoverished, dreadful conditions faced by these countries are partly the result of hegemonic and exploitive policies. So, they come here, in even greater numbers than ever before.
I think any immigration policy which we consider would also have to take into consideration and address the issues of what's going on in the countries where most of these immigrants coming from. We can't "build a wall," as some people would like. A more permanent fix would have to involve sustained economic development and standard of living improvements in all of these countries. That would be a long-term solution, but in the meantime, I hope they can figure something out.
When it comes to immigration policy, the problem seems to be that the Powers That Be can't seem to make up their minds as to whether they want to poop or get off the pot. We can't deport every person who here is here illegally. (We could try, but we're talking about millions of people; it would be bad.) But we could consider them "guest workers" so they would at least not have to work under the table under exploitative conditions. Above all else, they should be given decent, fair, and just treatment as required under international law and the principles of human rights.
I also think there's an international dimension to all of this, where we might need to think strategically. How we treat these people from these various countries will have an effect on relations with those countries. I've observed that whenever a Latin American country falls out of the U.S. fold, the U.S. government invariably freaks out and screams about it, as with Cuba and Nicaragua. It would be problematic if the U.S. were to lose any more Latin American countries which could fall within the Russian or Chinese sphere of influence. That, I think, is the key reason why we should never be too cavalier about alienating our neighbors to the south.