When leaving your job, there are several aspects to keep in mind.
In a broad sense,
Once you have analyzed the variables of quitting your job and your motivations still move you forward in a different direction from your present employment, then it is time to think of how doing so in a more narrow sense. It means, on the one hand, the administrative steps you need to follow, and; on the other hand, leave in the best terms you can.
1- Knowing the administrative steps you need to take will help you make your resignation process run smoothly.
First of all, consider a leave of absence for a year or more. Such a shift may require specific approvals, which implies an extra effort. However, it may be worth it. If your decision to leave for good is a fact, then consult the faculty handbook, which will give you the insights you may not be aware of. For example, at Cornell University, resignation by an academic employee "is normally effective at the end of an academic term or on June 30 or December 31 for those on 12/month appointments", and no less than a month's notice is required. You need to know your institution policies about vacations, etc. so that you can discuss those issues of your concern and do the necessary paperwork.
Secondly, notify the chairperson of the department and whoever necessary to make your resignation effective.
In the first place, talk in person, then write a letter stating dates, reasons, etc.
2- If possible, leaving in good terms may be the ground for future opportunities. No matter the reasons behind your decision or how well you get on with your colleagues, it is of great importance not to seem ungrateful and leave healthy professional relationships.
Feeling nervous and even guilty or anxious are common feelings when faced with the situation of moving on professionally. Just remember that you are not the first person to leave your job, and you won't be the last either.