Proper etiquette for withdrawing from an undergraduate research lab?
Just tell them, politely and with appreciation for what they've offered you. Sooner rather than later, so that they can plan for your departure and maybe have you prepare a useful contribution in your remaining time there - wrap up whatever you've been doing, document your work, train another student to continue your project, or whatever else they need.

It is understood that students are balancing a lot of competing interests and opportunities; as long as you handle yourself professionally (give plenty of notice, remain engaged and work hard during your remaining time there even though you know you won't continue, etc.), there is nothing to feel bad about.