The Apollo lunar module was battery powered, so could only maintain a livable environment for a few days (this was a major concern for Apollo 13, since the crew was reliant on the LM after the accident which disabled the service module). Once out of power, it would be unable to circulate air or to maintain a comfortable temperature inside.
Committing suicide on the moon, fortunately, is trivially easy. Once the LM was nearly out of power, they could depressurize the LM cabin while their suits weren't sealed (or exit the LM and then unseal their suits). They'd lose consciousness in a few seconds, albeit with some discomfort from the rapid depressurization, and die shortly thereafter.
As noted in other answers, there was not another rocket stacked and ready to launch in time to effect a rescue. If there had been, time would be very tight; the maximum surface stay of any of the Apollo landers (Apollo 17) was shorter than the Earth-moon flight time; I don't know if the LM endurance was longer than that, but it's conceivable that the astronauts could survive long enough to await rescue.
The crew transfer might be a challenge: the rescue crew would have to be suited up (because the entire cabin depressurizes to open the hatch; there's no airlock) and the rescuees would have to be suited up and wearing the bulky portable life support pack. They'd have to transfer one at a time, discarding their PLSS after connecting to the cabin environmental system. I'm not certain it would be physically possible to get four suited crew inside. I believe the extra mass would not be a major problem; the LM ascent stage was intended to return with about a human's mass worth of moon rocks, and usually completed its ascent with 150kg or more propellant remaining in the tanks. If it was limited to a lower orbit than usual, the command module could come down to reach it.
The alternative would be to land the rescue ship with a single crew member; this would be hazardous, but likely possible. The LM guidance computer was capable of semi-autonomous landing, and they'd have time on the outbound trip to program the precise location of the disabled lander as a target site. Three people could definitely fit in the LM (as demonstrated by Apollo 13).