The Shulhan Aruch (Orah Haim 581:2) notes the practice followed by many to fast on Ereb Rosh Hashanah. This custom is based on the Midrash’s comment that the day before Rosh Hashanah has the ability to atone for one-third of a person’s sins. This is a very significant day, and therefore those who are physically able to fast should make an effort to do so.
Those who follow this custom must formally accept the fast the previous day, in order for the fast to be considered a halachically acceptable fast day, such that "Anenu" may be recited in the Amida. The acceptance is made through the recitation of the brief "Ribon Ha’olamim" pronouncement which appears in the Siddurim. It is recited at the end of Amida during Minha, just before "Oseh Shalom." This should preferably be done during Minha Ketana (the later part of the Minha period, closer to sundown), though if it is done during Minha Gedola (in the early afternoon hours), it is acceptable. Even if one said this pronouncement outside the context of the Amida, the acceptance is nevertheless valid. Hacham Bension Abba Shaul (Israel, 1924-1998) ruled that even if one made the pronouncement after sundown, it is valid, as long as it was recited during the period of Ben Ha’shemashot (13.5 minutes after sudown).
The acceptance of the fast must be made verbally; it does not suffice to think the words in one’ s mind.
In the "Ribon Ha’olamim" text, one specifies that he takes it upon himself to fast "Me’alot Ha’shahar Ad Set Ha’kochavim" – from daybreak until dark. If one feels that observing a complete fast would be too difficult, he may commit to fasting until midday, or until some other point. If he commits to fasting until Set Ha’kochavim, he must fast until 20 minutes after sundown.
The text also includes the provision, "Ve’im Lo Ertzeh O Lo Uchal Ke’she’omar ‘Mizmor La’David’ Uchal Le’echol" – which stipulates that if one feels unable or unwilling to complete the fast, he will be allowed to eat after reciting "Mizmor Le’David" (the 23rd chapter of Tehillim). And thus if one decides during the day that he wishes to discontinue the fast, he should recite "Mizmor Le’David," which retroactively undoes his acceptance of a fast, such that he may now eat. Similarly, if a person forgot he had accepted a fast day, and began eating, he should recite "Mizmor Le’David" in order to retroactively uproot his acceptance, so that he will not be considered in violation of his commitment.
When reciting "Ribon Ha’olamim," one should not stipulate that he accepts the fast "Be’li Neder" (without making vow), because the entire purpose of this recitation is to make a formal vow to fast.
If one fasted on Ereb Rosh Hashanah three years in a row, it becomes an established Minhag (custom), and thus becomes forever binding. If he ever decides not to observe this fast, he would be required to perform Hatarat Nedarim – the annulment of a vow before a Bet Din. In order to avoid this situation, it is preferable when accepting the fast to have in mind that the acceptance is for this year only, and one has no intention of establishing a permanent custom.
Summary: There is a custom observed by many to fast on Ereb Rosh Hashanah, and those who are able to fast should make an effort to do so. One who chooses to fast must make a formal acceptance the previous day through the recitation of the "Ribon Ha’olamim" pronouncement printed in the Siddurim. This should preferably be done at the end of the Amida of Minha, before "Oseh Shalom." This pronouncement includes a stipulation that if one changes his mind during the fast, he may recite "Mizmor Le’David" (Tehillim 23) and then eat. When accepting the fast, one should have in mind that his acceptance is only for Ereb Rosh Hashanah this year, as otherwise, observing the fast three years in a row establishes a custom which is then forever binding (and would thus require Hatarat Nedarim when one wishes not to observe the fast).