Given a modular form, what is the precise formulation of BSD (in particular, the residue formula for the $L$function at special values)? And what about the special values if the $L$function is twisted by some character? Does there exist a good reference?

My comments are getting too long, so here is a tentative answer. First, a general statement: conjectures predicting special values of $L$functions are formulated for all motives over number fields. Because normalized eigenforms (even twisted by finite order characters $\chi$) are attached to motives (or viceversa), there exists conjectures predicting the special values of $L(f,s,\chi)$. Now what do they look like? For simplicity and because you are especially interested in the value of the residue, I'll restrict to the case of a critical value (so $s=0,\cdots,k1$ if $f$ is of weight $k$ EDIT: $s=1,\cdots,k1$ Thanks to David Loeffler for pointing this out). The general conjectures then imply that there exists a special element which is a basis of the determinant of the motivic cohomology which is sent to $L(f,s,\chi)$ by the realization morphism from motivic cohomology to Betti cohomology and to a specific basis of the determinant of étale cohomology by the realization morphism to $p$adic étale cohomology (for any $p$). But forget about this, because when $s≠k/2$ (which I assume henceforth), then $L(f,s,\chi)$ is nonzero (by Jacquet) and in this case, K.Kato has constructed a candidate $z$ for this conjectural element in his article $p$adic Hodge theory and values of zeta functions of modular forms. I can't really say that this $z$ lives in the right space, simply because I am unsure whether motivic cohomology is properly defined in this case, but at least it lives in something that has all the property you would wish for motivic cohomology (namely the second $K$theory group $K_{2}$ of the modular curves) and it is sent to the right value through the realization morphism to Betti cohomology. So now the Tamagawa Number Conjecture predicts that it should be sent to a specific basis of the determinant of the $p$adic étale cohmology for any $p$. Unraveling what it means in this case, you get that $H^2(\textrm{Spec}\ \mathbb Z[1/p],T)$ is a finite group and the following conjectural equality: \begin{equation} \sharp H^2_{et}(\textrm{Spec}\ \mathbb Z[1/p],T)=[H^1_{et}(\textrm{Spec}\ \mathbb Z[1/p],T):z] \end{equation} Here $T$ is any lattice in the Galois representation of your modular form and $[:]$ denotes generalized index (so $[\mathbb Z_{p}:1/p]=p^{1}$). Now you have a perfectly valid expression of a generalized BSD conjecture, and this is how I think of conjectures about special values in this case. However, you might want to express this conjecture in a way that recovers usual BSD when $f$ comes from an elliptic curve $E$. This again is a doable exercise (albeit one I find nontrivial) which is done for instance in BurnsFlach Math. Ann. 305 (section 1.7) or O.Venjakob London Math. Soc. Lecture Note Ser., 320 (section 3.1). I generally recommend the latter article because I learnt a lot from it myself but beware that, on this very specific question, there is a typo in the definition of one of the crucial objects, if memory serves well, so I rather recommend using both articles in parallel. 


This paper http://wstein.org/papers/motive_visibility/ by Dummigan, me, and Watkins gives a detailed answer to your question. Plus it has some explicit examples of weight 4 modular forms so that the corresponding motive conjecturally has nontrivial (visible) ShaferevichTate group. 


Try looking in the book by Bellaiche and Chenevier, "Families of Galois representations and higher rank Selmer groups" (published in Asterisque, or available from the Arxiv here). They give a nice description (Conjecture 5.1.3 in the arxiv version) of the BlochKato conjecture for the order of vanishing of the Lfunction for a general "geometric" Galois representation. They don't state a conjecture for the exact leading term; I don't know what this would look like in general. 

