The Martian heat ray in The War of the Worlds (1897) is not hand held as specified in Lexible's question. And not tentacle held either!
1934:
Although the possibility of meeting hostile inhabitants was remote, they carried at their belts light little deionizer tubes, those deadly modern weapons that destroy life by inducing a chemical change within the body.
[...]
Suddenly one of the radiant beings ceased its movements, hung, as it were, helplessly. In its shimmering membranes a hole had appeared, a hole through which the cold stars showed. Quickly, like a fire eating through cloth, the hole widened, spread through the complex ramifications of its being. It reached the tips of the ruffles, and went out. The prismatic light disappeared.
"You fool!" Ingraham tried to knock the deionizer from Durphee's hand, but the heavy space suit hindered him, and another of the radiant creatures died. And yet another, before Ingraham wrenched the tube from the other's grasp. Like glowing bubbles before a gale, the visitors swept upward and away, and in a few seconds there was no sign of them.
https://www.unz.org/Pub/FantasticMysteries-1939nov-00118[1]
From "The Radiant Enemies" by R.F. Starzl, first published in Argosy 10 February 1934.
https://www.isfdb.org/cgi-bin/title.cgi?71332[2]
1930:
There are hand held ray guns in E.E. Smith's Skylark Three Amazing Stories August 1930:
He touched the lever and the Skylark moved slowly toward the wreckage, the scattered fragments of which were beginning to move toward and around each other because of their mutual gravitational forces. Snapping on a searchlight, he swung its beam around, and as it settled upon one of the larger sections he saw a group of hooded figures; some of them upon the metal, others floating slowly toward it through space.
"Poor devils—they didn't have a chance," he remarked regretfully. "However, it was either they or we—look out! Sweet spirits of niter!"
He leaped back to the controls and the others were hurled bodily to the floor as he applied the power—for at a signal each of the hooded figures had leveled a tube and once more the outer screen had flamed into incandescence.
As the Skylark leaped away, Seaton focussed an attractor upon the one who had apparently signaled the attack. Rolling the vessel over in a short loop, so that the captive was hurled off into space upon the other side, he snatched the tube from the figure's grasp with one auxiliary attractor, and anchored head and limbs with others, so that the prisoner could scarcely move a muscle.
http://www.gutenberg.org/files/21051/21051-h/21051-h.htm#CHAPTER_III[3]
Thus the correct answer for the first hand held ray gun must be in or before 1930.